Skip to content

Commit

Permalink
Created smoke test for the build process.
Browse files Browse the repository at this point in the history
This smoke test will verify there's no errors being
generated when running the build process.

+ minor package.json test script refactoring for increased readability
  • Loading branch information
phillipj committed Jan 11, 2016
1 parent 0dbd6dc commit 54ab68e
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@
"serve": "node server.js",
"load-versions": "node scripts/load-versions.js",
"start": "npm run serve",
"test": "standard *.js scripts/*.js scripts/**/*.js tests/**/*.js && tape tests/**/*.test.js | faucet"
"test": "npm run test:lint && npm run test:unit && npm run test:smoke",
"test:lint": "standard *.js scripts/*.js scripts/**/*.js tests/*.js tests/**/*.js",
"test:unit": "tape tests/**/*.test.js | faucet",
"test:smoke": "tape tests/*.smoketest.js | faucet"
},
"repository": {
"type": "git",
Expand Down
18 changes: 18 additions & 0 deletions tests/build.smoketest.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
'use strict'

const path = require('path')
const exec = require('child_process').exec
const test = require('tape')

const pathToBuild = path.resolve(__dirname, '../build.js')

test('build.js', (t) => {
t.plan(1)

t.test('should not generate error', (t) => {
exec(`node ${pathToBuild}`, (err) => {
t.equal(err, null)
t.end()
})
})
})

0 comments on commit 54ab68e

Please sign in to comment.