test: replaced fixturesDir with fixtures module

This was an assigned task at Node.js Interactive North America 2017.
This replaced the fixturesDir exported by the common module with
the fixturesDir on the common/fixtures module.

PR-URL: https://github.com/nodejs/node/pull/15881
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
This commit is contained in:
Alex McKenzie 2017-10-06 11:59:12 -05:00 committed by Daniel Bevenius
parent b5e8ae4ff8
commit 0e1a9fafdd

View File

@ -3,9 +3,9 @@
const common = require('../common'); const common = require('../common');
if (!common.hasCrypto) if (!common.hasCrypto)
common.skip('missing crypto'); common.skip('missing crypto');
const fixtures = require('../common/fixtures');
const http2 = require('http2'); const http2 = require('http2');
const assert = require('assert'); const assert = require('assert');
const path = require('path');
const fs = require('fs'); const fs = require('fs');
const { const {
@ -14,7 +14,7 @@ const {
HTTP2_HEADER_LAST_MODIFIED HTTP2_HEADER_LAST_MODIFIED
} = http2.constants; } = http2.constants;
const fname = path.resolve(common.fixturesDir, 'elipses.txt'); const fname = fixtures.path('elipses.txt');
const data = fs.readFileSync(fname); const data = fs.readFileSync(fname);
const stat = fs.statSync(fname); const stat = fs.statSync(fname);