-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make TAP reporter TAP13-capable (#3552)
* Refactored code to use `TAPProducer` objects to write output. * Added TAP specification 13 output producer. * Version line * Errors and stacktraces inside YAML blocks * Added TAP specification 12 output producer [default]. * Added `reporterOptions.tapVersion` to target TAP producer. * Refactored to make use of `runner.stats` * Refactored to use `process.stdout` stream exclusively. * Updated to test against both specifications and incorporate work from PR #3528. * Added integration tests for specification conformance.
- Loading branch information
Showing
4 changed files
with
833 additions
and
177 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
'use strict'; | ||
|
||
/** | ||
* This file generates a wide range of output to test reporter functionality. | ||
*/ | ||
|
||
describe('Animals', function() { | ||
|
||
it('should consume organic material', function(done) { done(); }); | ||
it('should breathe oxygen', function(done) { | ||
// we're a jellyfish | ||
var actualBreathe = 'nothing'; | ||
var expectedBreathe = 'oxygen'; | ||
expect(actualBreathe, 'to equal', expectedBreathe); | ||
done(); | ||
}); | ||
it('should be able to move', function(done) { done(); }); | ||
it('should reproduce sexually', function(done) { done(); }); | ||
it('should grow from a hollow sphere of cells', function(done) { done(); }); | ||
|
||
describe('Vertebrates', function() { | ||
describe('Mammals', function() { | ||
it('should give birth to live young', function(done) { | ||
var expectedMammal = { | ||
consumesMaterial: 'organic', | ||
breathe: 'oxygen', | ||
reproduction: { | ||
type: 'sexually', | ||
spawnType: 'live', | ||
} | ||
}; | ||
var platypus = JSON.parse(JSON.stringify(expectedMammal)); | ||
platypus['reproduction']['spawnType'] = 'hard-shelled egg'; | ||
|
||
expect(platypus, 'to equal', expectedMammal); | ||
done(); | ||
}); | ||
|
||
describe('Blue Whale', function() { | ||
it('should be the largest of all mammals', function(done) { done(); }); | ||
it('should have a body in some shade of blue', function(done) { | ||
var bodyColor = 'blueish_grey'; | ||
var shadesOfBlue = ['cyan', 'light_blue', 'blue', 'indigo']; | ||
expect(bodyColor, 'to be one of', shadesOfBlue); | ||
|
||
done(); | ||
}); | ||
}); | ||
}); | ||
describe('Birds', function() { | ||
it('should have feathers', function(done) { done(); }); | ||
it('should lay hard-shelled eggs', function(done) { done(); }); | ||
}); | ||
}); | ||
|
||
describe('Tardigrades', function() { | ||
it('should answer to "water bear"', function(done) { done(); }); | ||
it('should be able to survive global mass extinction events', function(done) { | ||
throw new Error("How do we even test for this without causing one?") | ||
done(); | ||
}); | ||
}); | ||
}); |
Oops, something went wrong.