Skip to content

Commit bd52bff

Browse files
committed
address CR
1 parent e2f520b commit bd52bff

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

lib/effects.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ async function hopeThat(callback) {
4949
result = false
5050
const msg = err.inspect ? err.inspect() : err.toString()
5151
debug(`Unsuccessful assertion > ${msg}`)
52-
event.dispatcher.on(event.test.after, test => {
52+
event.dispatcher.on(event.test.finished, test => {
5353
test.notes.push({ type: 'conditionalError', text: msg })
5454
})
5555
recorder.session.restore(sessionName)

test/unit/mocha/asyncWrapper_test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ describe('AsyncWrapper', () => {
6060
})
6161

6262
it('should fire events', () => {
63+
recorder.reset()
6364
testWrapper(test).fn(() => null)
6465
expect(started.called).is.ok
6566
teardown()

test/unit/plugin/subtitles_test.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ describe('subtitles', () => {
2828
it('should not capture subtitle as video artifact was missing', async () => {
2929
const fsMock = sinon.mock(fsPromises)
3030

31-
const test = {}
31+
const test = { notes: [] }
3232

3333
fsMock.expects('writeFile').never()
3434

@@ -44,6 +44,7 @@ describe('subtitles', () => {
4444
const fsMock = sinon.mock(fsPromises)
4545

4646
const test = {
47+
notes: [],
4748
artifacts: {
4849
video: '../../lib/output/failedTest1.webm',
4950
},
@@ -71,6 +72,7 @@ describe('subtitles', () => {
7172
const fsMock = sinon.mock(fsPromises)
7273

7374
const test = {
75+
notes: [],
7476
artifacts: {
7577
video: '../../lib/output/failedTest1.webm',
7678
},
@@ -101,10 +103,11 @@ describe('subtitles', () => {
101103
fsMock.verify()
102104
})
103105

104-
it('should capture seperate steps for separate tests', async () => {
106+
it('should capture separate steps for separate tests', async () => {
105107
const fsMock = sinon.mock(fsPromises)
106108

107109
const test1 = {
110+
notes: [],
108111
artifacts: {
109112
video: '../../lib/output/failedTest1.webm',
110113
},
@@ -149,6 +152,7 @@ describe('subtitles', () => {
149152
}),
150153
)
151154
const test2 = {
155+
notes: [],
152156
artifacts: {
153157
video: '../../lib/output/failedTest2.webm',
154158
},

0 commit comments

Comments
 (0)