From c9f2b003682663389bb3dd8c717f2994b0484463 Mon Sep 17 00:00:00 2001 From: Corey Farrell Date: Mon, 9 Dec 2019 01:36:54 -0500 Subject: [PATCH] Add node.js 13 to testing Normalize output changes to match node.js 12. --- .travis.yml | 1 + test/spawn.js | 3 ++- test/tap/index.js | 8 +++++++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index acd30d1c0..b061fae3b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,7 @@ language: node_js node_js: + - 13 - 12 - 10 - 8 diff --git a/test/spawn.js b/test/spawn.js index 993851b39..c48d04d41 100644 --- a/test/spawn.js +++ b/test/spawn.js @@ -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 => { diff --git a/test/tap/index.js b/test/tap/index.js index 882be286f..407eb2bc7 100644 --- a/test/tap/index.js +++ b/test/tap/index.js @@ -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' + ) }) } }