Skip to content

Commit b9b0e54

Browse files
remove unnecessary function invocation
1 parent bfed066 commit b9b0e54

File tree

1 file changed

+14
-16
lines changed

1 file changed

+14
-16
lines changed

packages/wrangler/e2e/remote-binding/start-worker-remote-bindings.test.ts

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -140,22 +140,20 @@ it("doesn't connect to remote bindings when `remoteBindings` is set to `false`",
140140
}),
141141
});
142142

143-
await expect(
144-
(async () => {
145-
const worker = await startWorker({
146-
config: `${helper.tmpPath}/wrangler.json`,
147-
dev: {
148-
inspector: false,
149-
server: { port: 0 },
150-
remoteBindings: false,
151-
},
152-
});
153-
154-
await worker.ready;
155-
156-
await worker.fetch("http://example.com");
157-
})()
158-
).rejects.toThrowErrorMatchingInlineSnapshot(
143+
await expect(async () => {
144+
const worker = await startWorker({
145+
config: `${helper.tmpPath}/wrangler.json`,
146+
dev: {
147+
inspector: false,
148+
server: { port: 0 },
149+
remoteBindings: false,
150+
},
151+
});
152+
153+
await worker.ready;
154+
155+
await worker.fetch("http://example.com");
156+
}).rejects.toThrowErrorMatchingInlineSnapshot(
159157
`[Error: Binding AI needs to be run remotely]`
160158
);
161159
});

0 commit comments

Comments
 (0)