Skip to content

Commit

Permalink
test: Add eslint chai rules and fix issue where some tests weren't be…
Browse files Browse the repository at this point in the history
…ing run
  • Loading branch information
TimothyJones committed Oct 31, 2023
1 parent 849d2b5 commit 3dde3dd
Show file tree
Hide file tree
Showing 8 changed files with 672 additions and 606 deletions.
12 changes: 10 additions & 2 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
{
"extends": "standard",
"extends": ["standard", "plugin:mocha/recommended"],
"plugins": [
"mocha",
"@fintechstudios/eslint-plugin-chai-as-promised",
],
"rules": {
"no-var": "error"
"no-var": "error",
"mocha/max-top-level-suites": "off",
"mocha/no-setup-in-describe": "off",
"@fintechstudios/chai-as-promised/no-unhandled-promises": "error",
"@fintechstudios/chai-as-promised/no-await-in-condition": "error"
}
}
141 changes: 99 additions & 42 deletions package-lock.json

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

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,13 @@
"yargs": "^17.7.2"
},
"devDependencies": {
"@fintechstudios/eslint-plugin-chai-as-promised": "^3.1.0",
"chai": "^4.3.10",
"chai-as-promised": "^7.1.1",
"eslint": "^8.52.0",
"eslint-config-standard": "^17.1.0",
"eslint-plugin-import": "^2.29.0",
"eslint-plugin-mocha": "^10.2.0",
"eslint-plugin-n": "^15.2.0",
"eslint-plugin-promise": "^6.1.1",
"mocha": "^10.2.0",
Expand Down
2 changes: 1 addition & 1 deletion test/config-files.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ function mock ({ bump, changelog, tags } = {}) {
return () => stdMocks.flush()
}

describe('config files', () => {
describe('config files', function () {
beforeEach(function () {
shell.rm('-rf', 'tmp')
shell.config.silent = true
Expand Down
Loading

0 comments on commit 3dde3dd

Please sign in to comment.