Skip to content

Commit

Permalink
test: bump vitest v1.1.3 (youzan#12546)
Browse files Browse the repository at this point in the history
  • Loading branch information
inottn authored and CatsAndMice committed Apr 8, 2024
1 parent 510f643 commit 015cb5b
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 42 deletions.
4 changes: 2 additions & 2 deletions packages/vant/package.json
Expand Up @@ -61,14 +61,14 @@
"@vant/icons": "workspace:*",
"@vitejs/plugin-vue": "^4.5.2",
"@vitejs/plugin-vue-jsx": "^3.1.0",
"@vitest/coverage-istanbul": "^1.1.0",
"@vitest/coverage-istanbul": "^1.1.3",
"@vue/runtime-core": "^3.4.0-rc.1",
"@vue/test-utils": "^2.3.2",
"diffable-html": "^5.0.0",
"jsdom": "^22.1.0",
"typescript": "^5.0.4",
"vite": "^5.0.10",
"vitest": "^1.1.0",
"vitest": "^1.1.3",
"vitest-canvas-mock": "^0.3.3",
"vue": "^3.4.0-rc.1",
"vue-router": "^4.1.6"
Expand Down
8 changes: 2 additions & 6 deletions packages/vant/vitest.config.ts
@@ -1,10 +1,9 @@
import { defineConfig } from 'vitest/config';
import vitePluginVue from '@vitejs/plugin-vue';
import vitePluginJsx from '@vitejs/plugin-vue-jsx';
import { cpus, totalmem } from 'os';
import { cpus } from 'os';

const cpuNum = Math.max(cpus().length - 1, 1);
const memory = totalmem();

export default defineConfig({
test: {
Expand All @@ -25,10 +24,7 @@ export default defineConfig({
poolOptions: {
vmThreads: {
// limit the memory to avoid OOM
memoryLimit:
typeof memory === 'number'
? memory * Math.min(1 / (cpuNum * 2), 0.1)
: undefined,
memoryLimit: Math.min(1 / (cpuNum * 2), 0.1),
},
},
environment: 'jsdom',
Expand Down
74 changes: 40 additions & 34 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 015cb5b

Please sign in to comment.