-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(vite): update to vitest v1 (nrwl#20747)
- Loading branch information
Showing
15 changed files
with
967 additions
and
227 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
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
165 changes: 165 additions & 0 deletions
165
...es/vite/src/migrations/update-17-3-0/__snapshots__/vitest-coverage-threshold.spec.ts.snap
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,165 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`vitest-coverage-threshold migration should move thresholds in threshold object - has 1 1`] = ` | ||
"/// <reference types="vitest" /> | ||
import { defineConfig } from 'vite'; | ||
import react from '@vitejs/plugin-react'; | ||
import viteTsConfigPaths from 'vite-tsconfig-paths'; | ||
export default defineConfig({ | ||
cacheDir: '../../node_modules/.vite/demo6', | ||
test: { | ||
globals: true, | ||
cache: { | ||
dir: '../node_modules/.vitest', | ||
}, | ||
environment: 'jsdom', | ||
include: ['src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'], | ||
reporters: ['default'], | ||
coverage: { | ||
thresholds: { | ||
branches: 75, | ||
}, | ||
reportsDirectory: '../coverage/demo6', | ||
provider: 'v8', | ||
}, | ||
}, | ||
}); | ||
" | ||
`; | ||
|
||
exports[`vitest-coverage-threshold migration should move thresholds in threshold object - has 2 1`] = ` | ||
"/// <reference types="vitest" /> | ||
import { defineConfig } from 'vite'; | ||
import react from '@vitejs/plugin-react'; | ||
import viteTsConfigPaths from 'vite-tsconfig-paths'; | ||
export default defineConfig({ | ||
cacheDir: '../../node_modules/.vite/demo3', | ||
test: { | ||
globals: true, | ||
cache: { | ||
dir: '../node_modules/.vitest', | ||
}, | ||
environment: 'jsdom', | ||
include: ['src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'], | ||
reporters: ['default'], | ||
coverage: { | ||
thresholds: { | ||
lines: 100, | ||
statements: 100, | ||
}, | ||
reportsDirectory: '../coverage/demo3', | ||
provider: 'v8', | ||
}, | ||
}, | ||
}); | ||
" | ||
`; | ||
|
||
exports[`vitest-coverage-threshold migration should move thresholds in threshold object - has 3 1`] = ` | ||
"/// <reference types="vitest" /> | ||
import { defineConfig } from 'vite'; | ||
import react from '@vitejs/plugin-react'; | ||
import viteTsConfigPaths from 'vite-tsconfig-paths'; | ||
export default defineConfig({ | ||
cacheDir: '../../node_modules/.vite/demo4', | ||
test: { | ||
globals: true, | ||
cache: { | ||
dir: '../node_modules/.vitest', | ||
}, | ||
environment: 'jsdom', | ||
include: ['src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'], | ||
reporters: ['default'], | ||
coverage: { | ||
thresholds: { | ||
lines: 100, | ||
statements: 100, | ||
branches: 75, | ||
}, | ||
reportsDirectory: '../coverage/demo4', | ||
provider: 'v8', | ||
}, | ||
}, | ||
}); | ||
" | ||
`; | ||
|
||
exports[`vitest-coverage-threshold migration should move thresholds in threshold object - has all 1`] = ` | ||
"/// <reference types="vitest" /> | ||
import { defineConfig } from 'vite'; | ||
import react from '@vitejs/plugin-react'; | ||
import viteTsConfigPaths from 'vite-tsconfig-paths'; | ||
export default defineConfig({ | ||
cacheDir: '../../node_modules/.vite/demo5', | ||
test: { | ||
globals: true, | ||
cache: { | ||
dir: '../node_modules/.vitest', | ||
}, | ||
environment: 'jsdom', | ||
include: ['src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'], | ||
reporters: ['default'], | ||
coverage: { | ||
thresholds: { | ||
lines: 100, | ||
statements: 100, | ||
functions: 60, | ||
branches: 75, | ||
}, | ||
reportsDirectory: '../coverage/demo5', | ||
provider: 'v8', | ||
}, | ||
}, | ||
}); | ||
" | ||
`; | ||
|
||
exports[`vitest-coverage-threshold migration should not do anything if coverage but no thresholds 1`] = ` | ||
"/// <reference types="vitest" /> | ||
import { defineConfig } from 'vite'; | ||
import react from '@vitejs/plugin-react'; | ||
import viteTsConfigPaths from 'vite-tsconfig-paths'; | ||
export default defineConfig({ | ||
cacheDir: '../../node_modules/.vite/demo2', | ||
test: { | ||
globals: true, | ||
cache: { | ||
dir: '../node_modules/.vitest', | ||
}, | ||
environment: 'jsdom', | ||
include: ['src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'], | ||
reporters: ['default'], | ||
coverage: { | ||
reportsDirectory: '../coverage/demo2', | ||
provider: 'v8', | ||
}, | ||
}, | ||
}); | ||
" | ||
`; | ||
|
||
exports[`vitest-coverage-threshold migration should not do anything if no coverage 1`] = ` | ||
"/// <reference types="vitest" /> | ||
import { defineConfig } from 'vite'; | ||
import react from '@vitejs/plugin-react'; | ||
import viteTsConfigPaths from 'vite-tsconfig-paths'; | ||
export default defineConfig({ | ||
cacheDir: '../../node_modules/.vite/demo', | ||
test: { | ||
globals: true, | ||
cache: { | ||
dir: '../../node_modules/.vitest', | ||
}, | ||
environment: 'jsdom', | ||
include: ['src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'], | ||
}, | ||
}); | ||
" | ||
`; |
Oops, something went wrong.