UNPKG

geckodriver

Version:

Downloader for https://github.com/mozilla/geckodriver/releases

19 lines (16 loc) 484 B
const test = require('ava'); const child_process = require('child_process'); test.cb('properly extracts', t => { child_process.exec('node index.js', (error, stdout, stderr) => { if (error) { return t.fail(`exec error: ${error}`) } t.is(stdout, 'Downloading geckodriver... Extracting... Complete.\n'); t.is(stderr, ''); t.end(); }); }); test('programmatic usage', t => { var driver = require('../lib/geckodriver') t.is(driver.version, '0.28.0') });