Skip to content

Commit 6f910f9

Browse files
committed
Add jasmine dependency
* Add jasmine configuration * Add stub BankAccount test so CI passes with jasmine * Add yarn test command * Add yarn test:watch command
1 parent 0dac5eb commit 6f910f9

File tree

6 files changed

+706
-5
lines changed

6 files changed

+706
-5
lines changed

.eslintrc.js

+7
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,25 @@
11
module.exports = {
22
env: {
33
es2020: true,
4+
jasmine: true,
45
node: true
56
},
67
plugins: [
8+
'jasmine',
79
'jsdoc'
810
],
911
extends: [
1012
'eslint:recommended',
13+
'plugin:jasmine/recommended',
1114
'plugin:jsdoc/recommended'
1215
],
1316
parser: 'babel-eslint',
1417
parserOptions: {
1518
ecmaVersion: 11,
1619
sourceType: 'module'
20+
},
21+
rules: {
22+
"jasmine/no-spec-dupes": "off",
23+
"jasmine/no-suite-dupes": "off"
1724
}
1825
}

.github/workflows/ci.yml

+1
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,4 @@ jobs:
4444
- name: Verify generated files are fresh
4545
run: git diff --exit-code
4646
- run: yarn lint
47+
- run: yarn test

package.json

+5-1
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,20 @@
1010
"eslint": "^7.5.0",
1111
"eslint-config-standard": "^14.1.1",
1212
"eslint-plugin-import": "^2.22.0",
13+
"eslint-plugin-jasmine": "^4.1.1",
1314
"eslint-plugin-jsdoc": "^30.0.3",
1415
"eslint-plugin-node": "^11.1.0",
1516
"eslint-plugin-promise": "^4.2.1",
1617
"eslint-plugin-standard": "^4.0.1",
18+
"jasmine": "^3.5.0",
1719
"jsdoc": "^3.6.5",
1820
"nodemon": "^2.0.4"
1921
},
2022
"scripts": {
2123
"lint": "eslint .",
22-
"lint:watch": "nodemon --exec 'yarn lint'"
24+
"lint:watch": "nodemon --exec 'yarn lint'",
25+
"test": "jasmine",
26+
"test:watch": "nodemon --exec 'yarn test'"
2327
}
2428
}
2529

spec/bank_account_spec.js

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
'use strict'
2+
3+
describe('BankAccount', () => {
4+
it('passes')
5+
})

spec/support/jasmine.json

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"spec_dir": "spec",
3+
"spec_files": [
4+
"**/*_spec.js"
5+
],
6+
"helpers": [
7+
"helpers/**/*.js"
8+
],
9+
"stopSpecOnExpectationFailure": false,
10+
"random": true
11+
}

0 commit comments

Comments
 (0)