From 9348f31c2aec996cf6cf7731244b2d76153440ea Mon Sep 17 00:00:00 2001 From: Teddy Katz Date: Tue, 4 Apr 2017 11:09:31 -0400 Subject: [PATCH] test: fix test-cli-syntax assertions on windows The test introduced in a5f91ab230c574d561780b6867d00f06fcc1e4de accidentally introduced failures on some windows builds. Update the assertion that was causing the failures. PR-URL: https://github.com/nodejs/node/pull/12212 Ref: https://github.com/nodejs/node/pull/11689 Reviewed-By: James M Snell Reviewed-By: Rich Trott --- test/parallel/test-cli-syntax.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test/parallel/test-cli-syntax.js b/test/parallel/test-cli-syntax.js index 953e8dbcf60630..5698d86ea4936f 100644 --- a/test/parallel/test-cli-syntax.js +++ b/test/parallel/test-cli-syntax.js @@ -124,9 +124,10 @@ syntaxArgs.forEach(function(args) { const args = [checkFlag, evalFlag, 'foo']; const c = spawnSync(node, args, {encoding: 'utf8'}); - assert.strictEqual( - c.stderr, - `${node}: either --check or --eval can be used, not both\n` + assert( + c.stderr.startsWith( + `${node}: either --check or --eval can be used, not both` + ) ); assert.strictEqual(c.status, 9, 'code === ' + c.status);