From 18c7841a7d5340b624705633ac8499b2f49c80f1 Mon Sep 17 00:00:00 2001 From: Ujjwal Sharma Date: Thu, 8 Mar 2018 22:49:56 +0530 Subject: [PATCH] test: rename test-regress-GH-3542 Rename the test appropriately alongside mentioning the subsystem Also, make a few basic changes to make sure the test conforms to the standard test structure Refs: https://github.com/nodejs/node/issues/19105 Refs: https://github.com/nodejs/node/blob/master/doc/guides/writing-tests.md#test-structure --- ...gress-GH-3542.js => test-fs-readfilesync-enoent.js} | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) rename test/parallel/{test-regress-GH-3542.js => test-fs-readfilesync-enoent.js} (79%) diff --git a/test/parallel/test-regress-GH-3542.js b/test/parallel/test-fs-readfilesync-enoent.js similarity index 79% rename from test/parallel/test-regress-GH-3542.js rename to test/parallel/test-fs-readfilesync-enoent.js index b652c95c9ac881..72888c98e580a6 100644 --- a/test/parallel/test-regress-GH-3542.js +++ b/test/parallel/test-fs-readfilesync-enoent.js @@ -1,13 +1,19 @@ 'use strict'; const common = require('../common'); + +// This test ensures fs.realpathSync works on properly on Windows without +// throwing ENOENT when the path involves a fileserver +// https://github.com/nodejs/node-v0.x-archive/issues/3542 + // This test is only relevant on Windows. -if (!common.isWindows) - common.skip('Windows specific test.'); const assert = require('assert'); const fs = require('fs'); const path = require('path'); +if (!common.isWindows) + common.skip('Windows specific test.'); + function test(p) { const result = fs.realpathSync(p); assert.strictEqual(result.toLowerCase(), path.resolve(p).toLowerCase());