mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
2124d0e971
Use template string where it's appropriate. PR-URL: https://github.com/nodejs/node/pull/17314 Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: James M Snell <jasnell@gmail.com>
21 lines
792 B
JavaScript
21 lines
792 B
JavaScript
'use strict';
|
|
require('../common');
|
|
const assert = require('assert');
|
|
const os = require('os');
|
|
const cp = require('child_process');
|
|
|
|
if (process.argv[2] === 'child') {
|
|
// This is the heart of the test.
|
|
new (process.binding('zlib').Zlib)(0).init(1, 2, 3, 4, 5);
|
|
} else {
|
|
const child = cp.spawnSync(`${process.execPath}`, [`${__filename}`, 'child']);
|
|
|
|
assert.strictEqual(child.stdout.toString(), '');
|
|
assert.ok(child.stderr.includes(
|
|
'WARNING: You are likely using a version of node-tar or npm that ' +
|
|
`is incompatible with this version of Node.js.${os.EOL}` +
|
|
'Please use either the version of npm that is bundled with Node.js, or ' +
|
|
'a version of npm (> 5.5.1 or < 5.4.0) or node-tar (> 4.0.1) that is ' +
|
|
`compatible with Node.js 9 and above.${os.EOL}`));
|
|
}
|