-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(workspace):
extends: true
correctly inherits all root config pr…
…operties (#7232)
- Loading branch information
1 parent
aec0b53
commit 798c0da
Showing
7 changed files
with
52 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { test, expect } from 'vitest'; | ||
import repro from 'virtual:repro'; | ||
|
||
test('importing a virtual module', () => { | ||
expect(repro).toBe('Hello, world!'); | ||
}); |
30 changes: 30 additions & 0 deletions
30
test/config/fixtures/workspace/config-extends/vitest.config.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { defineConfig } from 'vitest/config'; | ||
|
||
export default defineConfig({ | ||
plugins: [ | ||
{ | ||
name: 'virtual', | ||
resolveId(source) { | ||
if (source === 'virtual:repro') { | ||
return '\0virtual:repro'; | ||
} | ||
}, | ||
load(id) { | ||
if (id === '\0virtual:repro') { | ||
return `export default "Hello, world!"`; | ||
} | ||
}, | ||
}, | ||
], | ||
test: { | ||
workspace: [ | ||
{ | ||
extends: true, | ||
test: { | ||
name: 'node', | ||
environment: 'node', | ||
}, | ||
}, | ||
], | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters