-
-
Notifications
You must be signed in to change notification settings - Fork 751
Expand file tree
/
Copy pathskip_test.js
More file actions
33 lines (30 loc) · 1.09 KB
/
skip_test.js
File metadata and controls
33 lines (30 loc) · 1.09 KB
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
import * as chai from 'chai';
chai.should();
import assert from 'assert';
import path from 'path';
import { exec } from 'child_process';
import { fileURLToPath } from 'url';
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const runner = path.join(__dirname, '/../../bin/codecept.js')
const codecept_dir = path.join(__dirname, '/../data/sandbox/configs/skip')
const codecept_run = `${runner} run --config ${codecept_dir}/codecept.conf.js `
describe('Skip', () => {
it('should skip test with skip', done => {
exec(`${codecept_run}`, (err, stdout) => {
stdout.should.include('S @skip')
stdout.should.include('S @skip with opts')
stdout.should.not.include('skip test not passed')
stdout.should.include('✔ @NotSkip in')
assert(!err)
done()
})
})
it('should correctly pass custom opts for skip test', done => {
exec(`${codecept_run}`, (err, stdout) => {
stdout.should.include('test @skip with opts was marked for skip with customOpts: "Custom options for skip"')
assert(!err)
done()
})
})
})