Skip to content

Conversation

@darknoon
Copy link

Motivation: I wanted to see how the e2e tests worked, but when I checked out the repo they were failing:

~/Developer/Web/_others/vitest-vscode (main u=) $ pnpm run test-e2e

> [email protected] test-e2e /Users/andrew/Developer/Web/_others/vitest-vscode
> vitest --root test/e2e


 DEV  v4.0.0-beta.12 /Users/andrew/Developer/Web/_others/vitest-vscode/test/e2e

✔ Validated version: 1.105.1
✔ Found existing install in /Users/andrew/Developer/Web/_others/vitest-vscode/.vscode-test/vscode-darwin-arm64-1.105.1

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Failed Suites 1 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯

 FAIL  runner.test.ts [ runner.test.ts ]
TypeError: Siganture "test(name, fn, { ... })" was deprecated in Vitest 3 and removed in Vitest 4. Please, provide options as a second argument instead.
 ❯ runner.test.ts:22:1
     20| })
     21| 
     22| test('basic', async ({ launch }) => {
       | ^
     23|   const { page, tester } = await launch({
     24|     workspacePath: './samples/e2e',

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/1]⎯


 Test Files  1 failed (1)
      Tests  no tests
   Start at  10:47:44
   Duration  747ms (transform 30ms, setup 312ms, collect 0ms, tests 0ms, environment 0ms, prepare 4ms)

 FAIL  Tests failed. Watching for file changes...
       press h to show help, press q to quit

After these changes:

> [email protected] test-e2e /Users/andrew/Developer/Web/_others/vitest-vscode
> vitest --root test/e2e

 DEV  v4.0.3 /Users/andrew/Developer/Web/_others/vitest-vscode/test/e2e

✔ Validated version: 1.105.1
✔ Found existing install in /Users/andrew/Developer/Web/_others/vitest-vscode/.vscode-test/vscode-darwin-arm64-1.105.1
 ✓ runner.test.ts (7 tests) 48198ms
   ✓ basic  10991ms
   ✓ workspaces  4994ms
   ✓ custom imba language  4714ms
   ✓ browser mode correctly collects tests  6431ms
   ✓ watcher updates the file if there are several config files  7907ms
   ✓ ast collector keeps the pattern on rerun  6996ms
   ✓ continuous testing (1)
     ✓ reruns tests on test file change  6163ms

 Test Files  1 passed (1)
      Tests  7 passed (7)
   Start at  10:11:08
   Duration  49.19s (transform 28ms, setup 397ms, collect 31ms, tests 48.20s, environment 0ms, prepare 3ms)

 PASS  Waiting for file changes...
       press h to show help, press q to quit

}
},
}
} satisfies ViteUserConfigExport;
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was a little bit cursed, any alone wasn't telling ts that this was a valid argument to defineConfig(…) 🤷

@sheremet-va
Copy link
Member

Sorry for a long response! I did some more refactoring that should help with internal tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants