Skip to content

Commit

Permalink
test: maketest: Use promise based example common.npm call
Browse files Browse the repository at this point in the history
Credit: @iarna
  • Loading branch information
iarna committed Dec 19, 2018
1 parent f1edffb commit ae26347
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions scripts/maketest
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,11 @@ test('setup', t => {
})
test('example', t => {
common.npm(['install'], conf, function (err, code, stdout, stderr) {
if (err) throw err
return common.npm(['install'], conf).then((code, stdout, stderr) => {
t.is(code, 0, 'command ran ok')
t.comment(stdout.trim())
t.comment(stderr.trim())
// your assertions here
t.done()
})
})
Expand Down

0 comments on commit ae26347

Please sign in to comment.