UNPKG

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