Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add teamcity reporter support for Jasmine 2.0 #340

Open
wants to merge 4 commits into
base: Jasmine2.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions lib/jasmine-node/jasmine-loader.js

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

5 changes: 3 additions & 2 deletions lib/jasmine-node/runner.js

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"jasmine-growl-reporter": "~0.2.0",
"xml2js": "~0.4.1",
"grunt-exec": "~0.4.5",
"jasmine-reporters": "git://github.com/larrymyers/jasmine-reporters.git#2c7242dc11c15c2f156169bc704798568b8cb50d"
"jasmine-reporters": "~2.0.2"
},
"devDependencies": {
"grunt-contrib-coffee": "~0.10.1",
Expand Down
7 changes: 6 additions & 1 deletion src/jasmine-loader.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,13 @@ executeSpecsInFolder = (options) ->
nunit = new reporters.NUnitXmlReporter options.reporterConfigOpts
jasmine.addReporter nunit

if options.teamcity
options.reporterConfigOpts ?= {}
teamcity = new reporters.TeamCityReporter options.reporterConfigOpts
jasmine.addReporter teamcity

# If not using junit and not using nunit, Terminal Reporter!
unless options.junit or options.nunit
unless options.junit or options.nunit or options.teamcity
jasmine.addReporter new jasmineEnv.TerminalReporter options

if options.growl
Expand Down
3 changes: 3 additions & 0 deletions src/runner.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ minimistOpts =
"matchAll"
"noColor"
"noStackTrace"
"teamcity"
"verbose"
"version"
]
Expand Down Expand Up @@ -54,6 +55,7 @@ minimistOpts =
nunit : false
onComplete : -> return
reporterConfig : ''
teamcity : false
specFolders : []
verbose : false
watchFolders : []
Expand Down Expand Up @@ -83,6 +85,7 @@ Options:
--noStackTrace - suppress the stack trace generated from a test failure
--nunit - use the nunit reporter
--reporterConfig <file> - configuration json file to use with jasmine-reporters [nunit, junit]
--teamcity - use the teamcity reporter
--verbose - print extra information per each test run
--version - show the current version
--watch PATH - when used with --autoTest, watches the given path(s) and runs all tests if a change is detected
Expand Down