-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvitest.config.ts
More file actions
39 lines (37 loc) · 1.86 KB
/
Copy pathvitest.config.ts
File metadata and controls
39 lines (37 loc) · 1.86 KB
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import { defineConfig } from 'vitest/config'
import react from '@vitejs/plugin-react'
const src = (path: string): string => new URL(path, import.meta.url).pathname
export default defineConfig({
plugins: [react()],
resolve: {
// Subpaths before their package root: aliases match in order.
alias: {
'@internal': src('./internal'),
'@react-markdown-kit/renderer/gfm': src('./packages/renderer/src/gfm.ts'),
'@react-markdown-kit/renderer': src('./packages/renderer/src/index.ts'),
'@react-markdown-kit/editor/lexical': src('./packages/editor/src/lexical.ts'),
'@react-markdown-kit/editor': src('./packages/editor/src/index.ts'),
'@react-markdown-kit/variables/editor': src('./plugins/variables/src/editor.ts'),
'@react-markdown-kit/variables': src('./plugins/variables/src/index.ts'),
'@react-markdown-kit/mermaid/client': src('./plugins/mermaid/src/client.ts'),
'@react-markdown-kit/mermaid/canvas': src('./plugins/mermaid/src/canvas.ts'),
'@react-markdown-kit/mermaid/editor': src('./plugins/mermaid/src/editor.ts'),
'@react-markdown-kit/mermaid': src('./plugins/mermaid/src/index.ts'),
'@react-markdown-kit/slides/present': src('./plugins/slides/src/present.ts'),
'@react-markdown-kit/slides/editor': src('./plugins/slides/src/editor.ts'),
'@react-markdown-kit/slides': src('./plugins/slides/src/index.ts'),
},
},
test: {
environment: 'node',
include: ['tests/**/*.test.{ts,tsx}', 'packages/*/tests/**/*.test.{ts,tsx}', 'plugins/*/tests/**/*.test.{ts,tsx}'],
environmentMatchGlobs: [
['**/*.dom.test.{ts,tsx}', 'jsdom'],
['packages/editor/**', 'jsdom'],
['plugins/variables/tests/editor*', 'jsdom'],
['plugins/mermaid/tests/editor*', 'jsdom'],
['plugins/slides/tests/editor*', 'jsdom'],
['packages/renderer/tests/render*', 'jsdom'],
],
},
})