Created
May 17, 2017 15:20
-
-
Save rttomlinson/874872ee821e95d677c47b5a6cb6af4d to your computer and use it in GitHub Desktop.
Jasmine Boiler Plate
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| Expected File tree: | |
| spec/ | |
| helpers/ | |
| spec_helper.js | |
| support/ | |
| jasmine.json | |
| spec.js | |
| */ | |
| //spec_helper.js | |
| process.env.NODE_ENV = 'test'; | |
| beforeAll((done) => { | |
| done(); | |
| }); | |
| beforeEach((done) => { | |
| done(); | |
| }); | |
| afterEach((done) => { | |
| done(); | |
| }); | |
| afterAll((done) => { | |
| done(); | |
| }); | |
| //support/jasmine.json | |
| { | |
| "spec_dir": "spec", | |
| "spec_files": [ | |
| "**/*[sS]pec.js" | |
| ], | |
| "helpers": [ | |
| "../../node_modules/jasmine-es6/lib/install.js", | |
| "helpers/**/*.js" | |
| ], | |
| "stopSpecOnExpectationFailure": false, | |
| "random": false | |
| } | |
| //spec.js | |
| describe(); | |
| //Helpful package.json scripts | |
| "test-jasmine-es6": "npm run nodemon --exec ./node_modules/jasmine-es6/bin/jasmine.js", | |
| "nodemon": "./node_modules/nodemon/bin/nodemon.js" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment