-
-
Notifications
You must be signed in to change notification settings - Fork 750
Expand file tree
/
Copy pathscenario_stale_test.js
More file actions
27 lines (24 loc) · 891 Bytes
/
scenario_stale_test.js
File metadata and controls
27 lines (24 loc) · 891 Bytes
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
import * as chai from 'chai';
chai.should();
import { expect } from 'expect';
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')
const codecept_run = `${runner} run`
const config_run_config = config => `${codecept_run} --config ${codecept_dir}/${config}`
describe('Scenario termination check', () => {
before(() => {
process.chdir(codecept_dir)
})
it('Should always fail and terminate', done => {
exec(config_run_config('codecept.scenario-stale.js'), (err, stdout) => {
expect(stdout).toContain('should not stale scenario error') // feature
expect(err).toBeTruthy()
done()
})
})
})