test: add & configure Jest

Fixes #153

Signed-off-by: Ardalan Amini <[email protected]>
This commit is contained in:
Ardalan Amini committed 2024-10-30 14:34:45 +03:30
1 parent 5f05b761d3
commit cce7f4fd60
11 files changed
+2600 -24

No files matched your search

+7 -1
View File
@@ -31,7 +31,8 @@
"build:watch": "pnpm build --watch",
"package": "ncc build --out action --minify --source-map --license licenses.txt",
"all": "pnpm lint:fix && pnpm build && pnpm package",
"test": "echo \"Error: no test specified\" && exit 1"
"test": "node --expose-gc node_modules/jest/bin/jest -c jest.config.ts",
"test:coverage": "pnpm test -- --coverage"
},
"dependencies": {
"@actions/core": "^1.11.1",
@@ -44,6 +45,9 @@
"@commitlint/cli": "^19.5.0",
"@commitlint/config-conventional": "^19.5.0",
"@commitlint/types": "^19.5.0",
"@swc/core": "^1.7.40",
"@swc/jest": "^0.2.36",
"@types/jest": "^29.5.14",
"@types/semver": "^7.5.8",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser": "^6.21.0",
@@ -54,7 +58,9 @@
"eslint-plugin-import": "^2.31.0",
"husky": "^9.1.6",
"is-ci": "^3.0.1",
"jest": "^29.7.0",
"prettier": "^3.3.3",
"ts-node": "^10.9.2",
"typescript": "^5.6.3"
}
}