|
30 | 30 | "@eslint/js": "^9.19.0", |
31 | 31 | "@types/debug": "^4.1.7", |
32 | 32 | "@types/estree": "^1.0.0", |
33 | | - "@types/mocha": "^9.0.0", |
34 | 33 | "@types/node": "^18.8.4", |
35 | 34 | "@types/semver": "^7.3.12", |
36 | 35 | "@typescript-eslint/eslint-plugin": "^8.22.0", |
37 | 36 | "@typescript-eslint/parser": "^8.22.0", |
| 37 | + "@vitest/coverage-v8": "^3.2.4", |
| 38 | + "@vitest/ui": "^3.2.4", |
38 | 39 | "chokidar": "^3.5.2", |
39 | 40 | "cross-spawn": "^7.0.3", |
40 | 41 | "eslint": "^9.19.0", |
|
46 | 47 | "eslint-plugin-unicorn": "^57.0.0", |
47 | 48 | "fs-extra": "^10.0.0", |
48 | 49 | "jsonc-eslint-parser": "^2.0.3", |
49 | | - "mocha": "^9.1.3", |
50 | 50 | "npm-run-all": "^4.1.5", |
51 | | - "nyc": "^15.1.0", |
52 | | - "opener": "^1.5.2", |
53 | 51 | "prettier": "^3.4.2", |
54 | 52 | "rimraf": "^3.0.2", |
55 | 53 | "ts-node": "^10.9.2", |
56 | 54 | "tsdown": "^0.12.9", |
57 | 55 | "typescript": "~5.7.3", |
| 56 | + "vite": "^6.3.5", |
| 57 | + "vitest": "^3.2.4", |
58 | 58 | "wait-on": "^6.0.0", |
59 | 59 | "warun": "^1.0.0" |
60 | 60 | }, |
61 | 61 | "scripts": { |
62 | 62 | "build": "tsdown", |
63 | | - "clean": "rimraf .nyc_output coverage", |
64 | | - "coverage": "opener ./coverage/lcov-report/index.html", |
| 63 | + "coverage": "vitest --coverage --ui", |
65 | 64 | "lint": "eslint src test package.json", |
66 | | - "pretest": "run-s build lint", |
67 | | - "test": "npm run -s test:mocha", |
68 | | - "test:mocha": "mocha --require ts-node/register \"test/*.js\" --reporter dot --timeout 60000", |
69 | | - "test:cover": "nyc mocha \"test/*.js\" --reporter dot --timeout 60000", |
70 | | - "test:debug": "mocha --require ts-node/register/transpile-only \"test/*.js\" --reporter dot --timeout 60000", |
| 65 | + "test": "vitest", |
| 66 | + "test:cover": "vitest --coverage", |
71 | 67 | "update-fixtures": "ts-node --transpile-only scripts/update-fixtures-ast.js && ts-node --transpile-only scripts/update-fixtures-document-fragment.js", |
72 | 68 | "preversion": "npm test", |
73 | 69 | "version": "npm run -s build", |
74 | 70 | "postversion": "git push && git push --tags", |
75 | 71 | "prewatch": "npm run -s clean", |
76 | 72 | "watch": "run-p watch:*", |
77 | 73 | "watch:tsdown": "tsdown --watch", |
78 | | - "watch:test": "wait-on dist/index.js && warun dist/index.js \"test/*.js\" \"test/fixtures/ast/*/*.json\" \"test/fixtures/*\" --debounce 1000 --no-initial -- nyc mocha \"test/*.js\" --reporter dot --timeout 10000", |
79 | | - "watch:update-ast": "wait-on dist/index.js && warun dist/index.js \"test/fixtures/ast/*/*.vue\" -- ts-node scripts/update-fixtures-ast.js", |
80 | | - "watch:coverage-report": "wait-on coverage/lcov-report/index.html && opener coverage/lcov-report/index.html" |
| 74 | + "watch:update-ast": "wait-on dist/index.js && warun dist/index.js \"test/fixtures/ast/*/*.vue\" -- ts-node scripts/update-fixtures-ast.js" |
81 | 75 | }, |
82 | 76 | "repository": { |
83 | 77 | "type": "git", |
|
0 commit comments