UNPKG

476 BJavaScriptView Raw
1const test = require('ava');
2const child_process = require('child_process');
3
4test.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
15test('programmatic usage', t => {
16 var driver = require('../lib/geckodriver')
17 t.is(driver.version, '0.30.0')
18});