-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
p3-minor-bugAn edge case that only affects very specific usage (priority)An edge case that only affects very specific usage (priority)
Description
Describe the bug
Between the docs and this test I would expect both of the following tests to pass, but the second test fails.
const extendedTest = test.extend<{ foo?: boolean }>({
foo: false,
});
describe('foo is scoped to true', () => {
extendedTest.scoped({ foo: true });
extendedTest('foo is true', ({ foo }) => {
expect(foo).toBe(true);
});
});
describe('foo is left as default of false', () => {
extendedTest('foo is false', ({ foo }) => {
expect(foo).toBe(false);
});
});Reproduction
https://stackblitz.com/edit/vitest-dev-vitest-vwwnhltm?file=test%2Fbasic.test.ts
System Info
System:
OS: macOS 15.3.2
CPU: (10) arm64 Apple M1 Pro
Memory: 154.95 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 22.14.0 - ~/Library/NodeJS/bin/node
Yarn: 1.22.19 - ~/Library/NodeJS/bin/yarn
npm: 10.9.2 - ~/Library/NodeJS/bin/npm
Browsers:
Chrome: 134.0.6998.166
Edge: 134.0.3124.95
Safari: 18.3.1Used Package Manager
npm
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
Metadata
Metadata
Assignees
Labels
p3-minor-bugAn edge case that only affects very specific usage (priority)An edge case that only affects very specific usage (priority)