Skip to content

Commit

Permalink
test: avoid empty fixture in fs test
Browse files Browse the repository at this point in the history
Refactor test-fs-error-messages to use tmpdir for its empty directory
rather than using a not-actually-empty directory called "empty" in
fixtures.

PR-URL: #21044
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
Trott authored and MylesBorins committed Jun 6, 2018
1 parent b1f0907 commit c74c83a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/parallel/test-fs-error-messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,17 @@
'use strict';
const common = require('../common');
const fixtures = require('../common/fixtures');
const tmpdir = require('../common/tmpdir');
const assert = require('assert');
const fs = require('fs');

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('create-file.js');
const existingDir = fixtures.path('empty');
const existingDir = tmpdir.path;
const existingDir2 = fixtures.path('keys');
const { COPYFILE_EXCL } = fs.constants;
const uv = process.binding('uv');
Expand Down

0 comments on commit c74c83a

Please sign in to comment.