From 91d3fea3c80e3a35c52235d48dfd1d8250cc3184 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Tue, 12 Jul 2016 16:31:46 -0700 Subject: [PATCH] test: improve error message in test-tick-processor Provide additional information about values that indicate test failed. PR-URL: https://github.com/nodejs/node/pull/7693 Reviewed-By: Colin Ihrig Reviewed-By: Brian White --- test/parallel/test-tick-processor.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/parallel/test-tick-processor.js b/test/parallel/test-tick-processor.js index 686e7178360ef9..9d4cbf295ce635 100644 --- a/test/parallel/test-tick-processor.js +++ b/test/parallel/test-tick-processor.js @@ -1,8 +1,8 @@ 'use strict'; -var fs = require('fs'); -var assert = require('assert'); -var cp = require('child_process'); -var common = require('../common'); +const fs = require('fs'); +const assert = require('assert'); +const cp = require('child_process'); +const common = require('../common'); // TODO(mhdawson) Currently the test-tick-processor functionality in V8 // depends on addresses being smaller than a full 64 bits. Aix supports @@ -49,12 +49,12 @@ function runTest(pattern, code) { return /^isolate-/.test(file); }); if (matches.length != 1) { - assert.fail(null, null, 'There should be a single log file.'); + common.fail('There should be a single log file.'); } var log = matches[0]; var out = cp.execSync(process.execPath + ' --prof-process --call-graph-size=10 ' + log, {encoding: 'utf8'}); - assert(pattern.test(out)); + assert(pattern.test(out), `${pattern} not matching ${out}`); fs.unlinkSync(log); }