Skip to content

Commit a313232

Browse files
authored
Apply suggestions from code review
1 parent d231cd8 commit a313232

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/content/docs/workers/testing/vitest-integration/write-your-first-test.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ By importing the Worker we can write a unit test for its `fetch` handler.
163163
// Wait for all `Promise`s passed to `ctx.waitUntil()` to settle before running test assertions
164164
await waitOnExecutionContext(ctx);
165165
expect(response.status).toBe(404);
166-
expect(response.text()).toBe("Not found");
166+
expect(await response.text()).toBe("Not found");
167167
});
168168
});
169169

@@ -184,7 +184,7 @@ You can use the SELF fetcher provided by the `cloudflare:test` to write an integ
184184
it("responds with not found and proper status for /404", async () => {
185185
const response = await SELF.fetch("http://example.com/404");
186186
expect(response.status).toBe(404);
187-
expect(response.text()).toBe("Not found");
187+
expect(await response.text()).toBe("Not found");
188188
});
189189
});
190190

0 commit comments

Comments
 (0)