Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Replace Jasmine with Jest #405

Merged
merged 3 commits into from
Oct 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
run: |
yarn install --frozen-lockfile
yarn lint
yarn test
yarn test:coverage
if: |
contains(github.event.commits[0].message, '[skip ci]') == false &&
contains(github.event.commits[0].message, '[ci skip]') == false
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
.cache
.DS_Store
.idea/
.nyc_output/
.vscode/
.yarnclean
config.json
Expand Down
6 changes: 0 additions & 6 deletions jasmine.json

This file was deleted.

17 changes: 17 additions & 0 deletions jest.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"collectCoverage": false,
"collectCoverageFrom": ["**/*.{ts,tsx}", "!**/*.d.ts", "!**/index.ts", "!**/start.ts"],
"coverageReporters": ["html", "lcov", "text"],
"coverageThreshold": {
"global": {
"branches": 100,
"functions": 100,
"lines": 100,
"statements": 100
}
},
"preset": "ts-jest",
"setupFilesAfterEnv": [],
"testEnvironment": "node",
"testRegex": "\\.test\\.tsx?$"
}
15 changes: 0 additions & 15 deletions nyc.config.coverage.json

This file was deleted.

10 changes: 0 additions & 10 deletions nyc.config.json

This file was deleted.

14 changes: 8 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@
"dependencies": {},
"description": "",
"devDependencies": {
"@types/jasmine": "3.10.0",
"@types/jest": "27.0.2",
"@types/node": "16.11.2",
"@typescript-eslint/eslint-plugin": "5.1.0",
"@typescript-eslint/parser": "5.1.0",
"cross-env": "7.0.3",
"eslint": "8.0.1",
"eslint-config-prettier": "8.3.0",
"eslint-plugin-prettier": "4.0.0",
Expand All @@ -17,13 +18,13 @@
"eslint-plugin-unused-imports": "1.1.5",
"generate-changelog": "1.8.0",
"husky": "4.3.8",
"jasmine": "3.10.0",
"jest": "27.3.1",
"lint-staged": "11.2.3",
"nyc": "15.1.0",
"prettier": "2.4.1",
"pretty-quick": "3.1.1",
"rimraf": "3.0.2",
"ts-node": "10.3.0",
"ts-jest": "27.0.7",
"ts-node": "10.3.1",
"typescript": "4.4.4"
},
"engines": {
Expand All @@ -48,6 +49,7 @@
"build": "tsc",
"changelog:commit": "git add CHANGELOG.md && git commit -m \"docs: updated CHANGELOG.md\"",
"clean": "rimraf .nyc_output coverage dist",
"dev": "ts-node ./src/start.ts",
"dist": "yarn clean && yarn build",
"fix": "yarn fix:other && yarn fix:code",
"fix:code": "yarn lint:code --fix --quiet",
Expand All @@ -63,8 +65,8 @@
"release:minor": "generate-changelog -m -x \"chore,test\" && yarn changelog:commit && npm version minor",
"release:patch": "generate-changelog -p -x \"chore,test\" && yarn changelog:commit && npm version patch",
"start": "ts-node ./src/start.ts",
"test": "nyc --nycrc-path=nyc.config.coverage.json jasmine --config=jasmine.json",
"test:dev": "nyc --nycrc-path=nyc.config.json jasmine --config=jasmine.json",
"test": "cross-env NODE_ENV=test jest ./src",
"test:coverage": "yarn test --coverage",
"test:types": "yarn lint:types"
},
"version": "0.0.0"
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@
"strict": true,
"target": "es6"
},
"exclude": ["dist", "node_modules"]
"exclude": ["coverage", "dist", "node_modules"]
}
Loading