-
-
Notifications
You must be signed in to change notification settings - Fork 750
Expand file tree
/
Copy pathstore-test-and-suite_test.js
More file actions
27 lines (24 loc) · 1005 Bytes
/
store-test-and-suite_test.js
File metadata and controls
27 lines (24 loc) · 1005 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 { exec } from 'child_process';
import path from 'path';
import { codecept_dir, codecept_run } from './consts.js';
import debugFactory from 'debug';
const debug = debugFactory('codeceptjs:tests');
import { fileURLToPath } from 'url';
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const config_run_config = (config, grep, verbose = false) => `${codecept_run} ${verbose ? '--verbose' : ''} --config ${codecept_dir}/configs/store-test-and-suite/${config} ${grep ? `--grep "${grep}"` : ''}`
describe('CodeceptJS store-test-and-suite', function () {
this.timeout(10000)
it('should run store-test-and-suite test', done => {
exec(config_run_config('codecept.conf.js'), (err, stdout) => {
debug(stdout)
expect(stdout).toContain('test store-test-and-suite test')
expect(stdout).toContain('OK')
expect(err).toBeFalsy()
done()
})
})
})