Skip to content

Commit

Permalink
test: replace Mocha with AVA
Browse files Browse the repository at this point in the history
  • Loading branch information
screendriver committed Nov 10, 2021
1 parent 4cf0f30 commit 9ff3be0
Show file tree
Hide file tree
Showing 6 changed files with 242 additions and 93 deletions.
4 changes: 2 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:prettier/recommended",
"plugin:mocha/recommended"
"plugin:ava/recommended"
],
"plugins": ["@typescript-eslint", "mocha"],
"plugins": ["@typescript-eslint", "ava"],
"env": {
"node": true
},
Expand Down
8 changes: 8 additions & 0 deletions ava.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module.exports = {
// files: ['test/**/*.test.*'],
extensions: ['ts'],
require: ['ts-node/register/transpile-only'],
environmentVariables: {
TS_NODE_PROJECT: 'tsconfig.base.json',
},
};
140 changes: 140 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
"scripts": {
"compile": "tsc --build",
"lint": "eslint src test --ext '.ts'",
"test:unit": "mocha test/unit/**/*.test.*",
"test:unit:coverage": "c8 mocha test/unit/**/*.test.*",
"test:integration": "TS_NODE_PROJECT=tsconfig.base.json mocha test/integration/**/*.test.*"
"test:unit": "ava test/unit/**/*.test.*",
"test:unit:coverage": "c8 ava test/unit/**/*.test.*",
"test:integration": "ava test/integration/**/*.test.*"
},
"dependencies": {
"micro": "9.3.4",
Expand All @@ -51,6 +51,7 @@
"c8": "7.10.0",
"eslint": "8.2.0",
"eslint-config-prettier": "8.3.0",
"eslint-plugin-ava": "13.1.0",
"eslint-plugin-prettier": "4.0.0",
"got": "9.6.0",
"prettier": "2.4.1",
Expand Down
Loading

0 comments on commit 9ff3be0

Please sign in to comment.