@@ -137,6 +137,28 @@ if (!process.env.CLOUDFLARE_ACCOUNT_ID || !process.env.CLOUDFLARE_API_TOKEN) {
137137 ) ;
138138 } ) ;
139139 } ) ;
140+
141+ describe ( "remote bindings without actually establishing a remote connection" , ( ) => {
142+ const projectPath = seed ( "remote-bindings-config-account-id" , "pnpm" ) ;
143+
144+ test ( "for connection to remote bindings during dev the account_id present in the wrangler config file is used" , async ( {
145+ expect,
146+ } ) => {
147+ const proc = await runLongLived ( "pnpm" , "dev" , projectPath ) ;
148+ await vi . waitFor (
149+ async ( ) => {
150+ expect ( proc . stderr ) . toMatch (
151+ // Note: this error message shows that we're attempting to establish the remote proxy connection
152+ // using the "not-a-valid-account-id-abc" account id
153+ / A r e q u e s t t o t h e C l o u d f l a r e A P I \( \/ a c c o u n t s \/ n o t - a - v a l i d - a c c o u n t - i d - a b c \/ .* ?\) f a i l e d /
154+ ) ;
155+ } ,
156+ {
157+ timeout : 10_000 ,
158+ }
159+ ) ;
160+ } ) ;
161+ } ) ;
140162}
141163
142164describe ( "remote bindings disabled" , ( ) => {
@@ -163,25 +185,3 @@ describe("remote bindings disabled", () => {
163185 ) ;
164186 } ) ;
165187} ) ;
166-
167- describe ( "remote bindings without actually establishing a remote connection" , ( ) => {
168- const projectPath = seed ( "remote-bindings-config-account-id" , "pnpm" ) ;
169-
170- test ( "for connection to remote bindings during dev the account_id present in the wrangler config file is used" , async ( {
171- expect,
172- } ) => {
173- const proc = await runLongLived ( "pnpm" , "dev" , projectPath ) ;
174- await vi . waitFor (
175- async ( ) => {
176- expect ( proc . stderr ) . toMatch (
177- // Note: this error message shows that we're attempting to establish the remote proxy connection
178- // using the "not-a-valid-account-id-abc" account id
179- / A r e q u e s t t o t h e C l o u d f l a r e A P I \( \/ a c c o u n t s \/ n o t - a - v a l i d - a c c o u n t - i d - a b c \/ .* ?\) f a i l e d /
180- ) ;
181- } ,
182- {
183- timeout : 10_000 ,
184- }
185- ) ;
186- } ) ;
187- } ) ;
0 commit comments