-
-
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(vitest,runner): simplify
test.extend
type exports (#6707)
- Loading branch information
Showing
6 changed files
with
55 additions
and
3 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,13 @@ | ||
{ | ||
"name": "@vitest/test-dts-fixture", | ||
"type": "module", | ||
"private": true, | ||
"scripts": { | ||
"build": "rm -rf dist && tsc -p tsconfig.json", | ||
"check": "tsc -p tsconfig.check.json", | ||
"test": "pnpm build && pnpm check" | ||
}, | ||
"devDependencies": { | ||
"vitest": "workspace:*" | ||
} | ||
} |
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,7 @@ | ||
import { test } from 'vitest' | ||
|
||
export const myTest = test.extend<{ now: number }>({ | ||
now: async ({}, use) => { | ||
await use(Date.now()) | ||
}, | ||
}) |
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,12 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "ESNext", | ||
"module": "NodeNext", | ||
"moduleResolution": "NodeNext", | ||
"types": [], | ||
"strict": true, | ||
"noEmit": true, | ||
"verbatimModuleSyntax": true | ||
}, | ||
"include": ["dist"] | ||
} |
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,14 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "ESNext", | ||
"module": "ESNext", | ||
"moduleResolution": "Bundler", | ||
"strict": true, | ||
"declaration": true, | ||
"declarationMap": true, | ||
"outDir": "dist", | ||
"sourceMap": true, | ||
"verbatimModuleSyntax": true | ||
}, | ||
"include": ["src"] | ||
} |