add tests for npm install

This commit is contained in:
Vanessa Yuen 2017-07-18 13:38:57 -04:00
parent 663710e8eb
commit 40555371ba
3 changed files with 106 additions and 11 deletions

15
npm/test/test.js Normal file
View file

@ -0,0 +1,15 @@
var tape = require('tape')
var electron = require('../')
var path = require('path')
var pathExists = require('path-exists')
var getHomePath = require('home-path')()
tape('has local binary', function (t) {
t.ok(pathExists.sync(electron), 'electron was downloaded')
t.end()
})
tape('has cache folder', function (t) {
t.ok(pathExists.sync(path.join(getHomePath, './.electron')), 'cache exists')
t.end()
})