Browse Source

test: switch to fixtures module

In test-file-read-noexist, switch from common.fixturesDir to the
fixtures module.

PR-URL: https://github.com/nodejs/node/pull/15880
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
v9.x-staging
Christopher Sidebottom 7 years ago
committed by Rich Trott
parent
commit
152bf22d02
  1. 4
      test/parallel/test-file-read-noexist.js

4
test/parallel/test-file-read-noexist.js

@ -21,11 +21,11 @@
'use strict'; 'use strict';
const common = require('../common'); const common = require('../common');
const fixtures = require('../common/fixtures');
const assert = require('assert'); const assert = require('assert');
const path = require('path');
const fs = require('fs'); const fs = require('fs');
const filename = path.join(common.fixturesDir, 'does_not_exist.txt'); const filename = fixtures.path('does_not_exist.txt');
fs.readFile(filename, 'latin1', common.mustCall(function(err, content) { fs.readFile(filename, 'latin1', common.mustCall(function(err, content) {
assert.ok(err); assert.ok(err);
assert.strictEqual(err.code, 'ENOENT'); assert.strictEqual(err.code, 'ENOENT');

Loading…
Cancel
Save