1 | const test = require('ava');
|
2 | const child_process = require('child_process');
|
3 |
|
4 | test.cb('properly extracts', t => {
|
5 | child_process.exec('node index.js', (error, stdout, stderr) => {
|
6 | if (error) {
|
7 | return t.fail(`exec error: ${error}`)
|
8 | }
|
9 | t.assert(stdout.includes('Downloading geckodriver'), stdout);
|
10 | t.is(stderr, '');
|
11 | t.end();
|
12 | });
|
13 | });
|
14 |
|
15 | test('programmatic usage', t => {
|
16 | var driver = require('../lib/geckodriver')
|
17 | t.is(driver.version, '0.30.0')
|
18 | });
|