-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #200 from AElfProject/chore/switch-packages-to-use…
…-vitest Chore/switch packages to use vitest
- Loading branch information
Showing
50 changed files
with
850 additions
and
2,347 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 was deleted.
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
18 changes: 8 additions & 10 deletions
18
packages/base/src/__tests__/enhancedLocalStorageInWindow.test.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
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,4 @@ | ||
import baseViteConfig from '../tools/vite.config'; | ||
import { mergeConfig } from 'vitest/config'; | ||
|
||
export default mergeConfig(baseViteConfig, {}); |
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,2 @@ | ||
import '../tools/__mocks__/setupGlobal'; | ||
import '../tools/__mocks__/setupLocal'; |
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 |
---|---|---|
@@ -1,45 +1,4 @@ | ||
import { defineConfig, configDefaults } from 'vitest/config'; | ||
import tsconfigPaths from 'vite-tsconfig-paths'; | ||
import baseViteConfig from '../tools/vite.config'; | ||
import { mergeConfig } from 'vitest/config'; | ||
|
||
const exclude = [...configDefaults.exclude, '**/dist/*.*', '**/.*', '**/*.setup.*']; | ||
|
||
export default defineConfig({ | ||
plugins: [tsconfigPaths()], | ||
test: { | ||
maxConcurrency: 20, | ||
pool: 'vmThreads', | ||
poolOptions: { | ||
threads: { | ||
singleThread: true, | ||
}, | ||
}, | ||
isolate: false, // only safe with the poolOptions above | ||
css: false, | ||
deps: { | ||
optimizer: { | ||
web: { | ||
enabled: true, | ||
}, | ||
}, | ||
}, | ||
globals: true, | ||
watch: false, | ||
environment: 'happy-dom', | ||
setupFiles: ['./vitest.setup'], | ||
include: ['./src/**/*(*.)?{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'], | ||
name: 'bridge', | ||
exclude, | ||
reporters: ['junit', 'default'], | ||
outputFile: { | ||
junit: './jest-report.xml', | ||
}, | ||
coverage: { | ||
all: false, | ||
enabled: true, | ||
provider: 'v8', | ||
exclude: [...exclude, '**/__tests__/*.*'], | ||
reportsDirectory: './coverage', | ||
reporter: [['json', { file: 'coverage-summary.json' }], ['text']], | ||
}, | ||
}, | ||
}); | ||
export default mergeConfig(baseViteConfig, {}); |
Oops, something went wrong.