mirror of https://github.com/nodejs/node.git
test: fix typos in test/parallel
This pr fixes typos in some parallel tests. PR-URL: https://github.com/nodejs/node/pull/42502 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Qingyu Deng <i@ayase-lab.com> Reviewed-By: Mestery <mestery@protonmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
parent
00cb0912ef
commit
c6051a08fa
|
@ -12,10 +12,10 @@ const longPath = path.join(...[tmpDir].concat(Array(30).fill('1234567890')));
|
||||||
fs.mkdirSync(longPath, { recursive: true });
|
fs.mkdirSync(longPath, { recursive: true });
|
||||||
|
|
||||||
// Test if we can have symlinks to files and folders with long filenames
|
// Test if we can have symlinks to files and folders with long filenames
|
||||||
const targetDirtectory = path.join(longPath, 'target-directory');
|
const targetDirectory = path.join(longPath, 'target-directory');
|
||||||
fs.mkdirSync(targetDirtectory);
|
fs.mkdirSync(targetDirectory);
|
||||||
const pathDirectory = path.join(tmpDir, 'new-directory');
|
const pathDirectory = path.join(tmpDir, 'new-directory');
|
||||||
fs.symlink(targetDirtectory, pathDirectory, 'dir', common.mustSucceed(() => {
|
fs.symlink(targetDirectory, pathDirectory, 'dir', common.mustSucceed(() => {
|
||||||
assert(fs.existsSync(pathDirectory));
|
assert(fs.existsSync(pathDirectory));
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|
|
@ -53,9 +53,9 @@ for (let i = 0; i < validDelays.length; i++) {
|
||||||
}
|
}
|
||||||
|
|
||||||
for (let i = 0; i < invalidCallbacks.length; i++) {
|
for (let i = 0; i < invalidCallbacks.length; i++) {
|
||||||
[0, 1].forEach((mesc) =>
|
[0, 1].forEach((msec) =>
|
||||||
assert.throws(
|
assert.throws(
|
||||||
() => s.setTimeout(mesc, invalidCallbacks[i]),
|
() => s.setTimeout(msec, invalidCallbacks[i]),
|
||||||
{
|
{
|
||||||
code: 'ERR_INVALID_ARG_TYPE',
|
code: 'ERR_INVALID_ARG_TYPE',
|
||||||
name: 'TypeError',
|
name: 'TypeError',
|
||||||
|
|
|
@ -11,7 +11,7 @@ let µtaskId;
|
||||||
const events = [];
|
const events = [];
|
||||||
|
|
||||||
async_hooks.createHook({
|
async_hooks.createHook({
|
||||||
init(id, type, triggerId, resoure) {
|
init(id, type, triggerId, resource) {
|
||||||
if (type === 'Microtask') {
|
if (type === 'Microtask') {
|
||||||
µtaskId = id;
|
µtaskId = id;
|
||||||
events.push('init');
|
events.push('init');
|
||||||
|
|
|
@ -155,10 +155,10 @@ const { Blob } = require('buffer');
|
||||||
// Ensure that Duplex.from works for blobs
|
// Ensure that Duplex.from works for blobs
|
||||||
{
|
{
|
||||||
const blob = new Blob(['blob']);
|
const blob = new Blob(['blob']);
|
||||||
const expecteByteLength = blob.size;
|
const expectedByteLength = blob.size;
|
||||||
const duplex = Duplex.from(blob);
|
const duplex = Duplex.from(blob);
|
||||||
duplex.on('data', common.mustCall((arrayBuffer) => {
|
duplex.on('data', common.mustCall((arrayBuffer) => {
|
||||||
assert.strictEqual(arrayBuffer.byteLength, expecteByteLength);
|
assert.strictEqual(arrayBuffer.byteLength, expectedByteLength);
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -68,7 +68,7 @@ assert.throws(() => {
|
||||||
message: 'Unknown encoding: {}'
|
message: 'Unknown encoding: {}'
|
||||||
});
|
});
|
||||||
|
|
||||||
(function checkVairableCaseEncoding() {
|
(function checkVariableCaseEncoding() {
|
||||||
const m = new MyWritable(function(isBuffer, type, enc) {
|
const m = new MyWritable(function(isBuffer, type, enc) {
|
||||||
assert.strictEqual(enc, 'ascii');
|
assert.strictEqual(enc, 'ascii');
|
||||||
}, { decodeStrings: false });
|
}, { decodeStrings: false });
|
||||||
|
|
Loading…
Reference in New Issue