Browse Source

test: refactor pummel/test-dtrace-jsstack

* `os.type()` check -> `common.isSunOS`
* != -> !==
* == -> ===

PR-URL: https://github.com/nodejs/node/pull/8175
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
v6.x
Rich Trott 8 years ago
committed by Evan Lucas
parent
commit
c568dfad39
  1. 6
      test/pummel/test-dtrace-jsstack.js

6
test/pummel/test-dtrace-jsstack.js

@ -3,7 +3,7 @@ const common = require('../common');
var assert = require('assert'); var assert = require('assert');
var os = require('os'); var os = require('os');
if (os.type() != 'SunOS') { if (!common.isSunOS) {
common.skip('no DTRACE support'); common.skip('no DTRACE support');
return; return;
} }
@ -52,7 +52,7 @@ dtrace.stdout.on('data', function(data) {
}); });
dtrace.on('exit', function(code) { dtrace.on('exit', function(code) {
if (code != 0) { if (code !== 0) {
console.error('dtrace exited with code ' + code); console.error('dtrace exited with code ' + code);
process.exit(code); process.exit(code);
} }
@ -65,7 +65,7 @@ dtrace.on('exit', function(code) {
for (var i = 0; i < lines.length; i++) { for (var i = 0; i < lines.length; i++) {
var line = lines[i]; var line = lines[i];
if (line.indexOf(sentinel) == -1 || frames.length === 0) if (line.indexOf(sentinel) === -1 || frames.length === 0)
continue; continue;
var frame = line.substr(line.indexOf(sentinel) + sentinel.length); var frame = line.substr(line.indexOf(sentinel) + sentinel.length);

Loading…
Cancel
Save