File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
src/content/docs/workers/testing/vitest-integration Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -162,8 +162,8 @@ By importing the Worker we can write a unit test for its `fetch` handler.
162162 const response = await worker .fetch (request , env , ctx );
163163 // Wait for all `Promise`s passed to `ctx.waitUntil()` to settle before running test assertions
164164 await waitOnExecutionContext (ctx );
165- expect (await response .status ).toBe (404 );
166- expect (await response .text ()).toBe (" Not found" );
165+ expect (response .status ).toBe (404 );
166+ expect (response .text ()).toBe (" Not found" );
167167 });
168168 });
169169
@@ -183,8 +183,8 @@ You can use the SELF fetcher provided by the `cloudflare:test` to write an integ
183183 describe (" Hello World worker" , () => {
184184 it (" responds with not found and proper status for /404" , async () => {
185185 const response = await SELF .fetch (" http://example.com/404" );
186- expect (await response .status ).toBe (404 );
187- expect (await response .text ()).toBe (" Not found" );
186+ expect (response .status ).toBe (404 );
187+ expect (response .text ()).toBe (" Not found" );
188188 });
189189 });
190190
You can’t perform that action at this time.
0 commit comments