Skip to content

Commit

Permalink
Replace "Ava" with jest
Browse files Browse the repository at this point in the history
  • Loading branch information
scopsy committed Sep 1, 2021
1 parent 3413eec commit 3f1a495
Show file tree
Hide file tree
Showing 5 changed files with 5,603 additions and 5,186 deletions.
4 changes: 0 additions & 4 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@
{ "allowWholeFile": true }
],
"eslint-comments/no-unused-disable": "error",
"import/order": [
"error",
{ "newlines-between": "always", "alphabetize": { "order": "asc" } }
],
"sort-imports": [
"error",
{ "ignoreDeclarationSort": true, "ignoreCase": true }
Expand Down
5 changes: 5 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
};
21 changes: 5 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@
"test:lint": "eslint src --ext .ts",
"test:prettier": "prettier \"src/**/*.ts\" --list-different",
"test:spelling": "cspell \"{README.md,.github/*.md,src/**/*.ts}\"",
"test:unit": "nyc --silent ava",
"test:unit": "jest",
"check-cli": "run-s test diff-integration-tests check-integration-tests",
"check-integration-tests": "run-s check-integration-test:*",
"diff-integration-tests": "mkdir -p diff && rm -rf diff/test && cp -r test diff/test && rm -rf diff/test/test-*/.git && cd diff && git init --quiet && git add -A && git commit --quiet --no-verify --allow-empty -m 'WIP' && echo '\\n\\nCommitted most recent integration test output in the \"diff\" directory. Review the changes with \"cd diff && git diff HEAD\" or your preferred git diff viewer.'",
"watch:build": "tsc -p tsconfig.json -w",
"watch:test": "nyc --silent ava --watch",
"watch:test": "jest --watch",
"cov": "run-s build test:unit cov:html cov:lcov && open-cli coverage/index.html",
"cov:html": "nyc report --reporter=html",
"cov:lcov": "nyc report --reporter=lcov",
Expand All @@ -42,13 +42,14 @@
"node": ">=10"
},
"devDependencies": {
"@ava/typescript": "^1.1.1",
"ts-jest": "^27.0.5",
"@types/jest": "^27.0.1",
"jest": "^27.1.0",
"@istanbuljs/nyc-config-typescript": "^1.0.1",
"@sendgrid/mail": "^7.4.6",
"@types/node": "^16.7.2",
"@typescript-eslint/eslint-plugin": "^4.0.1",
"@typescript-eslint/parser": "^4.0.1",
"ava": "^3.12.1",
"codecov": "^3.5.0",
"cspell": "^4.1.0",
"cz-conventional-changelog": "^3.3.0",
Expand Down Expand Up @@ -76,18 +77,6 @@
"LICENSE",
"README.md"
],
"ava": {
"failFast": true,
"timeout": "60s",
"typescript": {
"rewritePaths": {
"src/": "build/main/"
}
},
"files": [
"!build/module/**"
]
},
"config": {
"commitizen": {
"path": "cz-conventional-changelog"
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
// "emitDecoratorMetadata": true /* Enables experimental support for emitting type metadata for decorators. */,

"lib": ["es2017"],
"types": ["node"],
"types": ["node", "jest"],
"typeRoots": ["node_modules/@types", "src/types"]
},
"include": ["src/**/*.ts"],
Expand Down
Loading

0 comments on commit 3f1a495

Please sign in to comment.