Skip to content

Commit

Permalink
test: fix builds
Browse files Browse the repository at this point in the history
A former commit changed the tmpDir behavior and that broke this test.

PR-URL: nodejs#18500
Refs: nodejs@bf6ce47
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
  • Loading branch information
BridgeAR committed Feb 1, 2018
1 parent 39dc947 commit 4372185
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions test/parallel/test-fs-readfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,29 @@ const common = require('../common');
// This test ensures that fs.readFile correctly returns the
// contents of varying-sized files.

const tmpdir = require('../../test/common/tmpdir');
const assert = require('assert');
const fs = require('fs');
const path = require('path');

const prefix = `.removeme-fs-readfile-${process.pid}`;

common.refreshTmpDir();
tmpdir.refresh();

const fileInfo = [
{ name: path.join(common.tmpDir, `${prefix}-1K.txt`),
{ name: path.join(tmpdir.path, `${prefix}-1K.txt`),
len: 1024,
},
{ name: path.join(common.tmpDir, `${prefix}-64K.txt`),
{ name: path.join(tmpdir.path, `${prefix}-64K.txt`),
len: 64 * 1024,
},
{ name: path.join(common.tmpDir, `${prefix}-64KLessOne.txt`),
{ name: path.join(tmpdir.path, `${prefix}-64KLessOne.txt`),
len: (64 * 1024) - 1,
},
{ name: path.join(common.tmpDir, `${prefix}-1M.txt`),
{ name: path.join(tmpdir.path, `${prefix}-1M.txt`),
len: 1 * 1024 * 1024,
},
{ name: path.join(common.tmpDir, `${prefix}-1MPlusOne.txt`),
{ name: path.join(tmpdir.path, `${prefix}-1MPlusOne.txt`),
len: (1 * 1024 * 1024) + 1,
},
];
Expand Down

0 comments on commit 4372185

Please sign in to comment.