Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | 29x 14x 1x 2x 2x 1x 1x 11x | const testState = () => ({
type: 'test',
start: '2018-05-14T15:17:18.914Z',
_duration: 0,
uid: 'should can do something3',
cid: '0-0',
title: 'should can do something',
fullTitle: 'My awesome feature should can do something',
state: 'pending',
featureName: 'feature foo bar',
scenarioName: 'story foo bar'
})
export function testStart() {
return testState()
}
export function testPassed() {
return Object.assign(testState(), { state: 'passed', end: '2018-05-14T15:17:21.631Z', _duration: 2730 })
}
export function testFailed() {
const error =
{
message: 'foo == bar',
stack: 'AssertionError [ERR_ASSERTION]: foo == bar',
type: 'AssertionError [ERR_ASSERTION]',
name: 'AssertionError',
expected: 'foo',
actual: 'bar'
}
return Object.assign(testState(), { error, state: 'failed', end: '2018-05-14T15:17:21.631Z', _duration: 2730 })
}
export function testFailedWithMultipleErrors() {
const errors =
[
{
message: 'ReferenceError: All is Dust',
stack: 'ReferenceError: All is Dust'
},
{
message: 'InternalError: Abandon Hope',
stack: 'InternalError: Abandon Hope'
}
]
return Object.assign(testState(), { errors, state: 'failed', end: '2018-05-14T15:17:21.631Z', _duration: 2730 })
}
export function testPending() {
return Object.assign(testState(), { state: 'pending', end: '2018-05-14T15:17:21.631Z', _duration: 0 })
}
|