forked from peternewnham/react-html-parser
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvitest.config.ts
More file actions
34 lines (33 loc) · 1.39 KB
/
Copy pathvitest.config.ts
File metadata and controls
34 lines (33 loc) · 1.39 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
import path from 'node:path';
import react from '@vitejs/plugin-react';
import { defineConfig } from 'vitest/config';
export default defineConfig({
plugins: [react()],
resolve: {
alias: {
index: path.resolve(__dirname, 'src', 'index.ts'),
elementTypes: path.resolve(__dirname, 'src', 'elementTypes'),
utils: path.resolve(__dirname, 'src', 'utils'),
processNodes: path.resolve(__dirname, 'src', 'processNodes.ts'),
convertNodeToElement: path.resolve(__dirname, 'src', 'convertNodeToElement.ts'),
HtmlParser: path.resolve(__dirname, 'src', 'HtmlParser.ts'),
VoidElements: path.resolve(__dirname, 'src', 'dom/elements/VoidElements.ts'),
generatePropsFromAttributes: path.resolve(__dirname, 'src', 'utils/generatePropsFromAttributes.ts'),
htmlAttributesToReact: path.resolve(__dirname, 'src', 'utils/htmlAttributesToReact.ts'),
inlineStyleToObject: path.resolve(__dirname, 'src', 'utils/inlineStyleToObject.ts'),
isEmptyTextNode: path.resolve(__dirname, 'src', 'utils/isEmptyTextNode.ts'),
isValidTagOrAttributeName: path.resolve(__dirname, 'src', 'utils/isValidTagOrAttributeName.ts'),
},
},
test: {
globals: true,
environment: 'jsdom',
include: ['test/**/*.spec.{ts,tsx,js,jsx}'],
coverage: {
provider: 'v8',
reporter: ['lcov'],
reportsDirectory: 'coverage/',
includeAllSources: true,
},
},
});