Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix(browser): use correct project when filtering entries in the bro…
…wser mode
  • Loading branch information
sheremet-va committed Jan 3, 2025
commit 353567ff09381656a0a1861361b6357b7195a5a7
4 changes: 3 additions & 1 deletion packages/browser/src/node/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,9 @@ export default (parentServer: ParentBrowserProject, base = '/'): Plugin[] => {
name: 'vitest:browser:tests',
enforce: 'pre',
async config() {
const project = parentServer.vitest.getProjectByName(parentServer.config.name)
// this plugin can be used in different projects, but all of them
// have the same `include` pattern, so it doesn't matter which project we use
const project = parentServer.project
const { testFiles: allTestFiles } = await project.globTestFiles()
const browserTestFiles = allTestFiles.filter(
file => getFilePoolName(project, file) === 'browser',
Expand Down
Loading