mirror of
https://github.com/nodejs/node.git
synced 2025-08-15 13:48:44 +02:00

This test previously squeezed 70+ test cases into one single file and has been constantly crashing on Windows with exit code 3221226505 and no stack trace. As it is already marked as flaky there is no way to understand which test case is failing and the Windows CI was constantly orange. This patch splits the test cases into different files so it's easier to find out which case is exactly failing and to be skipped. PR-URL: https://github.com/nodejs/node/pull/59408 Refs: https://github.com/nodejs/node/issues/56794 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com> Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com> Reviewed-By: Filip Skokan <panva.ip@gmail.com>
17 lines
504 B
JavaScript
17 lines
504 B
JavaScript
// This tests that cpSync throws an error when attempting to copy a file with a name that is too long.
|
|
import '../common/index.mjs';
|
|
import { nextdir } from '../common/fs.js';
|
|
import assert from 'node:assert';
|
|
import { cpSync } from 'node:fs';
|
|
|
|
const isWindows = process.platform === 'win32';
|
|
|
|
import tmpdir from '../common/tmpdir.js';
|
|
tmpdir.refresh();
|
|
|
|
const src = 'a'.repeat(5000);
|
|
const dest = nextdir();
|
|
assert.throws(
|
|
() => cpSync(src, dest),
|
|
{ code: isWindows ? 'ENOENT' : 'ENAMETOOLONG' }
|
|
);
|