forked from livestorejs/livestore
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvitest.config.ts
More file actions
25 lines (21 loc) · 786 Bytes
/
vitest.config.ts
File metadata and controls
25 lines (21 loc) · 786 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import fs from 'node:fs'
import path from 'node:path'
import { defineConfig } from 'vitest/config'
/*
NOTE we're mapping to absolute paths here to avoid issues where tests seem to be resolved multiple times leading to duplicates
*/
const rootDir = import.meta.dirname
const rootPackages = fs
.readdirSync(path.join(rootDir, './packages/@livestore'))
.filter((dir) => fs.statSync(path.join(rootDir, './packages/@livestore', dir)).isDirectory())
.map((dir) => path.join(rootDir, './packages/@livestore', dir))
export default defineConfig({
test: {
workspace: [
...rootPackages,
// path.join(rootDir, 'tests/'),
path.join(rootDir, 'tests/integration/src/tests/node-sync/vitest.config.ts'),
path.join(rootDir, 'tests/package-common'),
],
},
})