11import { http , HttpResponse } from "msw" ;
2+ import { runInTempDir } from "@cloudflare/workers-utils/test-helpers" ;
23import { afterEach , beforeEach , describe , it , vi } from "vitest" ;
34import { mockAccount } from "../cloudchamber/utils" ;
45import { mockAccountId , mockApiToken } from "../helpers/mock-account-id" ;
@@ -19,6 +20,7 @@ import { runWrangler } from "../helpers/run-wrangler";
1920import type { ExpectStatic } from "vitest" ;
2021
2122describe ( "containers registries --help" , ( ) => {
23+ runInTempDir ( ) ;
2224 const std = mockConsoleMethods ( ) ;
2325
2426 it ( "should help" , async ( { expect } ) => {
@@ -46,6 +48,7 @@ describe("containers registries --help", () => {
4648} ) ;
4749
4850describe ( "containers registries configure" , ( ) => {
51+ runInTempDir ( ) ;
4952 const std = mockConsoleMethods ( ) ;
5053 const { setIsTTY } = useMockIsTTY ( ) ;
5154 const cliStd = mockCLIOutput ( ) ;
@@ -569,6 +572,7 @@ describe("containers registries configure", () => {
569572} ) ;
570573
571574describe ( "containers registries list" , ( ) => {
575+ runInTempDir ( ) ;
572576 const std = mockConsoleMethods ( ) ;
573577 const cliStd = mockCLIOutput ( ) ;
574578 mockAccountId ( ) ;
@@ -601,8 +605,7 @@ describe("containers registries list", () => {
601605 expect ( std . out ) . toMatchInlineSnapshot ( `
602606 "
603607 ⛅️ wrangler x.x.x
604- ──────────────────
605- Using profile: testing"
608+ ──────────────────"
606609 ` ) ;
607610 expect ( cliStd . stdout ) . toMatchInlineSnapshot ( `
608611 "╭ List configured container registries
@@ -636,6 +639,7 @@ describe("containers registries list", () => {
636639} ) ;
637640
638641describe ( "containers registries delete" , ( ) => {
642+ runInTempDir ( ) ;
639643 const cliStd = mockCLIOutput ( ) ;
640644 const std = mockConsoleMethods ( ) ;
641645 const { setIsTTY } = useMockIsTTY ( ) ;
@@ -698,7 +702,6 @@ describe("containers registries delete", () => {
698702 "
699703 ⛅️ wrangler x.x.x
700704 ──────────────────
701- Using profile: testing
702705 ? Are you sure you want to delete the registry credentials for 123456789012.dkr.ecr.us-west-2.amazonaws.com? This action cannot be undone.
703706 🤖 Using fallback value in non-interactive context: yes"
704707 ` ) ;
@@ -837,6 +840,7 @@ describe("containers registries delete", () => {
837840} ) ;
838841
839842describe ( "containers registries credentials" , ( ) => {
843+ runInTempDir ( ) ;
840844 const { setIsTTY } = useMockIsTTY ( ) ;
841845 const std = mockConsoleMethods ( ) ;
842846 mockAccountId ( ) ;
0 commit comments