1 | import test from 'ava';
|
2 | import child_process from '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.is(stdout, 'Downloading geckodriver... Extracting... Complete.\n');
|
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.26.0')
|
18 | });
|