Skip to content

Commit 6ab2cfb

Browse files
authored
Migrate tests to ava + add eslint (#41)
1 parent 7288854 commit 6ab2cfb

16 files changed

+3924
-718
lines changed

.eslintrc.js

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
module.exports = {
2+
root: true,
3+
parserOptions: {
4+
ecmaVersion: 2018,
5+
},
6+
extends: ['eslint:recommended', 'plugin:prettier/recommended'],
7+
env: {
8+
node: true,
9+
},
10+
rules: {
11+
curly: 'warn',
12+
'prettier/prettier': 'warn',
13+
},
14+
overrides: [
15+
{
16+
files: ['*.ts'],
17+
parser: '@typescript-eslint/parser',
18+
plugins: ['@typescript-eslint'],
19+
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended'],
20+
rules: {
21+
'@typescript-eslint/no-non-null-assertion': 'off',
22+
'@typescript-eslint/no-explicit-any': 'off',
23+
},
24+
},
25+
{
26+
files: ['buidler.config.js'],
27+
globals: {
28+
usePlugin: 'readonly',
29+
},
30+
},
31+
{
32+
files: ['ava.config.js'],
33+
parserOptions: {
34+
sourceType: 'module',
35+
},
36+
},
37+
],
38+
};

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ jobs:
1212
- uses: actions/checkout@v3
1313
- name: Set up environment
1414
uses: ./.github/actions/setup
15-
- run: npm run coverage -- --forbid-only
15+
- run: npm run test:coverage -- --forbid-only
1616
- run: npm run lint
1717
- uses: codecov/codecov-action@v3

.mocharc.json

Lines changed: 0 additions & 6 deletions
This file was deleted.

ava.config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
extensions: ['ts'],
3+
require: ['ts-node/register'],
4+
timeout: '600s',
5+
};

0 commit comments

Comments
 (0)