Skip to content

Commit 8f1a0cd

Browse files
committed
Remember the suite for a passed spec. (Fixes #63)
1 parent 1356859 commit 8f1a0cd

File tree

2 files changed

+14
-13
lines changed

2 files changed

+14
-13
lines changed

Diff for: lib/guard/jasmine/phantomjs/lib/reporter.js

+10-8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: lib/guard/jasmine/phantomjs/src/reporter.coffee

+4-5
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class ConsoleReporter
1414
}
1515

1616
specCount: 0
17-
currentSpecs: []
17+
currentSpecs: {}
1818
nestedSuiteResults: {}
1919

2020
# Report the start of a spec.
@@ -42,7 +42,8 @@ class ConsoleReporter
4242
specResult['messages'] = messages if messages.length isnt 0
4343

4444
@specCount += 1
45-
@currentSpecs.push specResult
45+
@currentSpecs[spec.suite.id] or= []
46+
@currentSpecs[spec.suite.id].push specResult
4647

4748
# Report results from a suite.
4849
#
@@ -55,7 +56,7 @@ class ConsoleReporter
5556
parent: suite.parentSuite?.id
5657
description: suite.description
5758
passed: suite.results().failedCount is 0
58-
specs: @currentSpecs
59+
specs: @currentSpecs[suite.id]
5960
suites: []
6061
}
6162

@@ -70,8 +71,6 @@ class ConsoleReporter
7071
if suiteResult.specs.length isnt 0 || suiteResult.suites.length isnt 0
7172
@runnerResult.suites.push suiteResult
7273

73-
@currentSpecs = []
74-
7574
# Report results from the runner.
7675
#
7776
# @param runner [jasmine.Runner] the runner

0 commit comments

Comments
 (0)