From d09bf6c61e04318e6e1846df3c5c58cbd8b0fa2d Mon Sep 17 00:00:00 2001 From: saurabhSiddhu Date: Sun, 4 Nov 2018 18:10:56 +0530 Subject: [PATCH] test: replacing fixture directory with temp --- test/parallel/test-fs-error-messages.js | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/test/parallel/test-fs-error-messages.js b/test/parallel/test-fs-error-messages.js index b0480059edd37f..96ff606cccec4e 100644 --- a/test/parallel/test-fs-error-messages.js +++ b/test/parallel/test-fs-error-messages.js @@ -26,15 +26,22 @@ const fixtures = require('../common/fixtures'); const tmpdir = require('../common/tmpdir'); const assert = require('assert'); const fs = require('fs'); +const path = require('path'); tmpdir.refresh(); -const nonexistentFile = fixtures.path('non-existent'); -const nonexistentDir = fixtures.path('non-existent', 'foo', 'bar'); -const existingFile = fixtures.path('exit.js'); -const existingFile2 = fixtures.path('a.js'); -const existingDir = tmpdir.path; + +const nonexistentFile = path.join(tmpdir.path, 'non-existent'); +const nonexistentDir = path.join(tmpdir.path, 'non-existent', 'foo', 'bar'); +const existingFile = path.join(tmpdir.path, 'existingFile.js'); +const existingFile2 = path.join(tmpdir.path, 'existingFile2.js'); +const existingDir = path.join(tmpdir.path, 'dir'); const existingDir2 = fixtures.path('keys'); +fs.mkdirSync(existingDir); +fs.writeFileSync(existingFile, 'test', 'utf-8'); +fs.writeFileSync(existingFile2, 'test', 'utf-8'); + + const { COPYFILE_EXCL } = fs.constants; const { internalBinding } = require('internal/test/binding'); const {