Skip to content

Commit e4bbe2d

Browse files
author
DavertMik
committed
fixed failed tests
1 parent 117aba6 commit e4bbe2d

File tree

3 files changed

+17
-16
lines changed

3 files changed

+17
-16
lines changed

test/data/sandbox/codecept.customworker.js

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,20 @@ exports.config = {
77
Workers: {
88
require: './workers_helper',
99
},
10+
CustomWorkers: {
11+
require: './custom_worker_helper',
12+
},
1013
},
1114
include: {},
1215
bootstrap: async () => {
13-
process.stdout.write('bootstrap b1+');
14-
return new Promise(done => {
16+
process.stdout.write('bootstrap b1+')
17+
return new Promise((done) => {
1518
setTimeout(() => {
16-
process.stdout.write('b2');
17-
done();
18-
}, 100);
19-
});
19+
process.stdout.write('b2')
20+
done()
21+
}, 100)
22+
})
2023
},
2124
mocha: {},
2225
name: 'sandbox',
23-
};
26+
}

test/unit/bdd_test.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
const Gherkin = require('@cucumber/gherkin')
22
const Messages = require('@cucumber/messages')
33

4-
let expect
5-
import('chai').then((chai) => {
6-
expect = chai.expect
7-
})
4+
const chai = require('chai')
5+
6+
const expect = chai.expect
87

98
const uuidFn = Messages.IdGenerator.uuid()
109
const builder = new Gherkin.AstBuilder(uuidFn)
@@ -190,7 +189,8 @@ describe('BDD', () => {
190189
})
191190
})
192191

193-
it('should execute scenarios step-by-step ', (done) => {
192+
it('should execute scenarios step-by-step ', async () => {
193+
recorder.start()
194194
printed = []
195195
container.append({
196196
helpers: {

test/unit/worker_test.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
let expect
2-
import('chai').then((chai) => {
3-
expect = chai.expect
4-
})
51
const path = require('path')
2+
const expect = require('chai').expect
3+
64
const { Workers, event, recorder } = require('../../lib/index')
75

86
describe('Workers', function () {

0 commit comments

Comments
 (0)