diff --git a/test/README.md b/test/README.md index 02359ca6826501..61f5b8bda91805 100644 --- a/test/README.md +++ b/test/README.md @@ -8,9 +8,6 @@ directory, see [the guide on writing tests](../doc/contributing/writing-tests.md On how to run tests in this directory, see [the contributing guide](../doc/contributing/pull-requests.md#step-6-test). -For the tests to run on Windows, be sure to clone Node.js source code with the -`autocrlf` git config flag set to true. - ## Test Directories | Directory | Runs on CI | Purpose | diff --git a/test/parallel/test-snapshot-typescript.js b/test/parallel/test-snapshot-typescript.js index 98502ccebedfc1..bed1e1e79dfac2 100644 --- a/test/parallel/test-snapshot-typescript.js +++ b/test/parallel/test-snapshot-typescript.js @@ -9,12 +9,13 @@ const { spawnSync } = require('child_process'); const tmpdir = require('../common/tmpdir'); const fixtures = require('../common/fixtures'); const fs = require('fs'); +const os = require('os'); tmpdir.refresh(); const blobPath = tmpdir.resolve('snapshot.blob'); // Concat test/fixtures/snapshot/typescript.js with -// test/fixtures/snapshot/typescript.js into +// test/fixtures/snapshot/typescript-main.js into // tmpdir/snapshot.js. const file = tmpdir.resolve('snapshot.js'); fs.copyFileSync(fixtures.path('snapshot', 'typescript.js'), file); @@ -57,7 +58,8 @@ fs.appendFileSync(file, assert.strictEqual(child.status, 0); const result = fs.readFileSync(outPath, 'utf8'); - const expected = fs.readFileSync( - fixtures.path('snapshot', 'ts-example.js'), 'utf8'); + const expected = fs + .readFileSync(fixtures.path('snapshot', 'ts-example.js'), 'utf8') + .replace(/\r?\n/g, os.EOL); assert.strictEqual(result, expected); }