@@ -3,7 +3,7 @@ import { resolve } from "node:path";
33import { setTimeout } from "node:timers/promises" ;
44import getPort from "get-port" ;
55import dedent from "ts-dedent" ;
6- import { afterAll , beforeAll , describe , expect , it } from "vitest" ;
6+ import { afterAll , beforeAll , describe , expect , it , vi } from "vitest" ;
77import { WranglerE2ETestHelper } from "./helpers/e2e-wrangler-test" ;
88import { fetchText } from "./helpers/fetch-text" ;
99import { generateResourceName } from "./helpers/generate-resource-name" ;
@@ -194,6 +194,66 @@ describe("wrangler dev - mixed mode", () => {
194194 ` ) ;
195195 } ) ;
196196
197+ describe ( "shows helpful error logs" , ( ) => {
198+ it ( "when a remote service binding is not properly configured" , async ( ) => {
199+ await helper . seed ( {
200+ "wrangler.json" : JSON . stringify ( {
201+ name : "mixed-mode-mixed-bindings-test" ,
202+ main : "simple-service-binding.js" ,
203+ compatibility_date : "2025-05-07" ,
204+ services : [
205+ {
206+ binding : "REMOTE_WORKER" ,
207+ service : "non-existent-service-binding" ,
208+ remote : true ,
209+ } ,
210+ ] ,
211+ } ) ,
212+ } ) ;
213+
214+ const worker = helper . runLongLived ( "wrangler dev --x-mixed-mode" ) ;
215+
216+ await worker . waitForReady ( ) ;
217+
218+ await vi . waitFor (
219+ ( ) =>
220+ expect ( worker . currentOutput ) . toContain (
221+ "Could not resolve service binding 'REMOTE_WORKER'. Target script 'non-existent-service-binding' not found."
222+ ) ,
223+ 5_000
224+ ) ;
225+ } ) ;
226+
227+ it ( "when a remote KV binding is not properly configured" , async ( ) => {
228+ await helper . seed ( {
229+ "wrangler.json" : JSON . stringify ( {
230+ name : "mixed-mode-mixed-bindings-test" ,
231+ main : "kv.js" ,
232+ compatibility_date : "2025-05-07" ,
233+ kv_namespaces : [
234+ {
235+ binding : "KV_BINDING" ,
236+ id : "non-existent-kv" ,
237+ remote : true ,
238+ } ,
239+ ] ,
240+ } ) ,
241+ } ) ;
242+
243+ const worker = helper . runLongLived ( "wrangler dev --x-mixed-mode" ) ;
244+
245+ await worker . waitForReady ( ) ;
246+
247+ await vi . waitFor (
248+ ( ) =>
249+ expect ( worker . currentOutput ) . toContain (
250+ "KV namespace 'non-existent-kv' is not valid."
251+ ) ,
252+ 5_000
253+ ) ;
254+ } ) ;
255+ } ) ;
256+
197257 describe ( "multi-worker" , ( ) => {
198258 it ( "handles both remote and local service bindings at the same time in all workers" , async ( ) => {
199259 await helper . seed ( {
0 commit comments