Skip to content

Commit 3dde3dd

Browse files
committed
test: Add eslint chai rules and fix issue where some tests weren't being run
1 parent 849d2b5 commit 3dde3dd

File tree

8 files changed

+672
-606
lines changed

8 files changed

+672
-606
lines changed

.eslintrc

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
{
2-
"extends": "standard",
2+
"extends": ["standard", "plugin:mocha/recommended"],
3+
"plugins": [
4+
"mocha",
5+
"@fintechstudios/eslint-plugin-chai-as-promised",
6+
],
37
"rules": {
4-
"no-var": "error"
8+
"no-var": "error",
9+
"mocha/max-top-level-suites": "off",
10+
"mocha/no-setup-in-describe": "off",
11+
"@fintechstudios/chai-as-promised/no-unhandled-promises": "error",
12+
"@fintechstudios/chai-as-promised/no-await-in-condition": "error"
513
}
614
}

package-lock.json

Lines changed: 99 additions & 42 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,13 @@
5555
"yargs": "^17.7.2"
5656
},
5757
"devDependencies": {
58+
"@fintechstudios/eslint-plugin-chai-as-promised": "^3.1.0",
5859
"chai": "^4.3.10",
5960
"chai-as-promised": "^7.1.1",
6061
"eslint": "^8.52.0",
6162
"eslint-config-standard": "^17.1.0",
6263
"eslint-plugin-import": "^2.29.0",
64+
"eslint-plugin-mocha": "^10.2.0",
6365
"eslint-plugin-n": "^15.2.0",
6466
"eslint-plugin-promise": "^6.1.1",
6567
"mocha": "^10.2.0",

test/config-files.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ function mock ({ bump, changelog, tags } = {}) {
6464
return () => stdMocks.flush()
6565
}
6666

67-
describe('config files', () => {
67+
describe('config files', function () {
6868
beforeEach(function () {
6969
shell.rm('-rf', 'tmp')
7070
shell.config.silent = true

0 commit comments

Comments
 (0)