setup tests

This commit is contained in:
Yanzhen Yu
2026-04-01 12:00:00 +08:00
parent a71fb73aaf
commit ed2bc918e0
9 changed files with 169 additions and 7 deletions

View File

@@ -4,7 +4,7 @@
"description": "rrweb's component to take a snapshot of DOM, aka DOM serializer",
"main": "index.js",
"scripts": {
"test": "mocha -r ts-node/register src/**/*.test.ts"
"test": "TS_NODE_FILES=true mocha -r ts-node/register test/**/*.ts"
},
"repository": {
"type": "git",
@@ -23,9 +23,13 @@
"homepage": "https://github.com/rrweb-io/rrweb-snapshot#readme",
"devDependencies": {
"@types/chai": "^4.1.4",
"@types/jsdom": "^11.12.0",
"@types/mocha": "^5.2.5",
"@types/node": "^10.11.3",
"chai": "^4.1.2",
"jsdom": "^12.1.0",
"mocha": "^5.2.0",
"mocha-jsdom": "^2.0.0",
"ts-node": "^7.0.1",
"tslint": "^4.5.1",
"typescript": "^3.0.3"