mirror of
https://github.com/youzan/vant.git
synced 2026-05-05 01:00:55 +08:00
test: fix Vitest segmentation fault (#13415)
This commit is contained in:
@@ -204,7 +204,7 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
Y
|
||||
</span>
|
||||
<span
|
||||
class="van-index-bar__index van-index-bar__index--active"
|
||||
class="van-index-bar__index"
|
||||
data-index="Z"
|
||||
>
|
||||
Z
|
||||
@@ -911,8 +911,8 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div style="height: 0px;">
|
||||
<div class="van-index-anchor van-index-anchor--sticky van-hairline--bottom">
|
||||
<div>
|
||||
<div class="van-index-anchor">
|
||||
Z
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
import { defineConfig } from 'vitest/config';
|
||||
import vitePluginVue from '@vitejs/plugin-vue';
|
||||
import vitePluginJsx from '@vitejs/plugin-vue-jsx';
|
||||
import { cpus } from 'os';
|
||||
|
||||
const cpuNum = Math.max(cpus().length - 1, 1);
|
||||
|
||||
export default defineConfig({
|
||||
test: {
|
||||
@@ -20,13 +17,6 @@ export default defineConfig({
|
||||
reporter: ['lcov', 'text-summary'],
|
||||
reportsDirectory: './test/coverage',
|
||||
},
|
||||
pool: 'vmThreads',
|
||||
poolOptions: {
|
||||
vmThreads: {
|
||||
// limit the memory to avoid OOM
|
||||
memoryLimit: Math.min(1 / (cpuNum * 2), 0.1),
|
||||
},
|
||||
},
|
||||
environment: 'jsdom',
|
||||
include: ['src/**/*.spec.[jt]s?(x)'],
|
||||
restoreMocks: true,
|
||||
|
||||
Reference in New Issue
Block a user