/app
/app/index.js
/app/package.json
/app/spec/helpers/junit_reporter.js
/app/spec/support/jasmine.json
/app/spec/tests/helloworld.spec.js
Last active
June 28, 2018 12:25
-
-
Save javascriptlove/36a94e3494086a013bf32f94e9b7fffc to your computer and use it in GitHub Desktop.
Basic Jasmine tests to be run on Bamboo with JUnit reporter test parser
This file contains 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
{ | |
"name": "exampleapp", | |
"devDependencies": { | |
"jasmine": "^2.5.3", | |
"jasmine-reporters": "^2.2.0" | |
}, | |
"scripts": { | |
"start": "node .", | |
"test": "JASMINE_CONFIG_PATH=spec/support/jasmine.json node node_modules/jasmine/bin/jasmine.js" | |
} | |
} |
This file contains 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
var reporters = require('jasmine-reporters'); | |
var junitReporter = new reporters.JUnitXmlReporter({ | |
savePath: __dirname + '/../../../test-reports', | |
consolidateAll: false | |
}); | |
jasmine.getEnv().addReporter(junitReporter); |
This file contains 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
{ | |
"spec_dir": "spec", | |
"spec_files": [ | |
"**/*.[sS]pec.js" | |
], | |
"helpers": [ | |
"helpers/**/*.js" | |
], | |
"stopSpecOnExpectationFailure": false, | |
"random": false | |
} |
This file contains 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
describe("Basic test", function() { | |
it("should work with basic test", function() { | |
expect(true).toBe(true); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment