Skip to content

Commit 4d058bd

Browse files
committed
test: use jest for the tests
1 parent b2c47a3 commit 4d058bd

7 files changed

Lines changed: 1499 additions & 244 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ package-lock.json
1111

1212
# Build directories
1313
dist
14+
coverage/

jest.config.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/**
2+
* For a detailed explanation regarding each configuration property, visit:
3+
* https://jestjs.io/docs/configuration
4+
*/
5+
6+
import type { Config } from "jest"
7+
8+
const config: Config = {
9+
// Automatically clear mock calls, instances, contexts and results before every test
10+
clearMocks: true,
11+
12+
// Indicates whether the coverage information should be collected while executing the test
13+
collectCoverage: true,
14+
15+
// The directory where Jest should output its coverage files
16+
coverageDirectory: "coverage",
17+
18+
// Indicates which provider should be used to instrument code for coverage
19+
coverageProvider: "v8",
20+
}
21+
22+
export default config

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,16 @@
2121
"lint": "eslint . --fix",
2222
"test.lint": "eslint .",
2323
"bump": "ncu -u",
24-
"test": "atom --test ./test/"
24+
"test": "jest"
2525
},
2626
"atomTestRunner": "./test/runner",
2727
"devDependencies": {
28-
"atom-jasmine3-test-runner": "^5.2.13",
2928
"eslint": "^8.48.0",
3029
"eslint-config-atomic": "^1.19.3",
30+
"jest": "^29.6.4",
3131
"prettier": "^3.0.3",
3232
"prettier-config-atomic": "^3.1.0",
33-
"requirefresh": "^5.4.0"
33+
"requirefresh": "^5.4.0",
34+
"ts-node": "^10.9.1"
3435
}
3536
}

0 commit comments

Comments
 (0)