summaryrefslogtreecommitdiff
path: root/test/parallel/test-fs-empty-readStream.js
diff options
context:
space:
mode:
authorJames M Snell <jasnell@gmail.com>2017-07-17 15:33:46 -0700
committerJames M Snell <jasnell@gmail.com>2017-08-07 18:00:57 -0700
commit7535a94c8a54bb6346c8e60dbae1c32d6f508212 (patch)
treee455c85470c3256bb064516a8fa8e2c4c059532b /test/parallel/test-fs-empty-readStream.js
parent7192e913f703c96eddff697c4ba0daef87930776 (diff)
downloadnode-new-7535a94c8a54bb6346c8e60dbae1c32d6f508212.tar.gz
test: begin normalizing fixtures use
Adds a new `../common/fixtures' module to begin normalizing `test/fixtures` use. Our test code is a bit inconsistent with regards to use of the fixtures directory. Some code uses `path.join()`, some code uses string concats, some other code uses template strings, etc. In mnay cases, significant duplication of code is seen when accessing fixture files, etc. This updates many (but by no means all) of the tests in the test suite to use the new consistent API. There are still many more to update, which would make an excelent Code-n-Learn exercise. PR-URL: https://github.com/nodejs/node/pull/14332 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Michaël Zasso <targos@protonmail.com>
Diffstat (limited to 'test/parallel/test-fs-empty-readStream.js')
-rw-r--r--test/parallel/test-fs-empty-readStream.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/parallel/test-fs-empty-readStream.js b/test/parallel/test-fs-empty-readStream.js
index 73658d9757..a5de2ab80b 100644
--- a/test/parallel/test-fs-empty-readStream.js
+++ b/test/parallel/test-fs-empty-readStream.js
@@ -22,10 +22,10 @@
'use strict';
const common = require('../common');
const assert = require('assert');
-const path = require('path');
const fs = require('fs');
+const fixtures = require('../common/fixtures');
-const emptyFile = path.join(common.fixturesDir, 'empty.txt');
+const emptyFile = fixtures.path('empty.txt');
fs.open(emptyFile, 'r', common.mustCall((error, fd) => {