-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Labels
bugSomething that isn't workingSomething that isn't workingvitestRelating to the Workers Vitest integrationRelating to the Workers Vitest integration
Description
Which Cloudflare product(s) does this pertain to?
Workers Vitest Integration
What version(s) of the tool(s) are you using?
3.60.3 [Wrangler]
What version of Node are you using?
20.18.0
What operating system and version are you using?
Windows 10
Describe the Bug
Observed behavior
Inline snapshot does not get updated.
Expected behavior
Inline snapshot gets updated.
Steps to reproduce
npm create cloudflare@latest, select hello world example with TS.- Delete some code in
test/index.spect.tsso that it's left with:
import { SELF } from 'cloudflare:test';
import { it, expect } from 'vitest';
it('responds with Hello World! (integration style)', async () => {
const response = await SELF.fetch('https://example.com');
expect(await response.text()).toMatchInlineSnapshot();
});npm run test, observe that inline snapshot does not get updated.- Add two lines of useless comments such as:
import { SELF } from 'cloudflare:test';
import { it, expect } from 'vitest';
+ // hello
+ // world
it('responds with Hello World! (integration style)', async () => {
const response = await SELF.fetch('https://example.com');
expect(await response.text()).toMatchInlineSnapshot();
});npm run test, observe that inline snapshot does get updated.
Please provide a link to a minimal reproduction
No response
Please provide any relevant error logs
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething that isn't workingSomething that isn't workingvitestRelating to the Workers Vitest integrationRelating to the Workers Vitest integration
Type
Projects
Status
Done