Skip to content

Commit

Permalink
better test config
Browse files Browse the repository at this point in the history
  • Loading branch information
Owen3H committed Jun 30, 2024
1 parent 2ac1ff9 commit 10c9cbe
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
Binary file modified bun.lockb
Binary file not shown.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@
"rollup": "^3.29.4",
"rollup-plugin-esbuild": "^5.0.0",
"typescript": "^5.5.2",
"vitest": "^0.34.6"
"vite-tsconfig-paths": "^4.3.2",
"vitest": "1.6.0"
},
"files": [
"src",
Expand Down
16 changes: 14 additions & 2 deletions vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,28 @@
import { defineConfig } from 'vitest/config'
import { resolve } from 'path'

import tsconfigPaths from 'vite-tsconfig-paths'

export default defineConfig({
plugins: [tsconfigPaths()],
test: {
setupFiles: ['dotenv/config'],
slowTestThreshold: 20000,
testTimeout: 7000,
globals: true
globals: true,
reporters: 'verbose',
pool: "vmForks",
poolOptions: {
vmForks: {
memoryLimit: 0.1, // 10% of sys mem
minForks: 2, // always use 2 threads
maxForks: 6 // 6 threads is enough
}
}
},
resolve: {
alias: {
'../classes': resolve(__dirname, './src/classes')
},
}
}
})

0 comments on commit 10c9cbe

Please sign in to comment.