Skip to content

Commit

Permalink
Add node.js 13 to testing
Browse files Browse the repository at this point in the history
Normalize output changes to match node.js 12.
  • Loading branch information
coreyfarrell committed Dec 9, 2019
1 parent 1610e0a commit c9f2b00
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
language: node_js

node_js:
- 13
- 12
- 10
- 8
Expand Down
3 changes: 2 additions & 1 deletion test/spawn.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ const main = () => {
stdio: [0, 1, 2]
})
t.plan(1)
s.main(() => t.matchSnapshot(s.output))
// Fixup for errno property change in 13.x
s.main(() => t.matchSnapshot(s.output.replace(/errno: -2/, 'errno: ENOENT')))
})

t.test('failure to spawn even harder', t => {
Expand Down
8 changes: 7 additions & 1 deletion test/tap/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,13 @@ module.exports = (...test) => {
signal: signal
}, 'exit status')
t.matchSnapshot(out, 'stdout')
t.matchSnapshot(err, 'stderr')
t.matchSnapshot(
err.split('\n')
// Remove node.js 13.0.0+ message:
.filter(a => a !== '(Use `node --trace-uncaught ...` to show where the exception was thrown)')
.join('\n'),
'stderr'
)
})
}
}

0 comments on commit c9f2b00

Please sign in to comment.