summaryrefslogtreecommitdiff
path: root/test/parallel/test-require-json.js
diff options
context:
space:
mode:
authorBryan English <bryan@bryanenglish.com>2016-05-26 09:43:09 -0700
committerBryan English <bryan@bryanenglish.com>2016-06-06 15:28:52 -0700
commitcc2a88a2f32bab8a14209713c19aaf14d7652a45 (patch)
treee072ffc6124cbe20fd96059fb14da790665f396e /test/parallel/test-require-json.js
parent843d58fcbbec09cde5633e0bc5ab025d0a640204 (diff)
downloadandroid-node-v8-cc2a88a2f32bab8a14209713c19aaf14d7652a45.tar.gz
android-node-v8-cc2a88a2f32bab8a14209713c19aaf14d7652a45.tar.bz2
android-node-v8-cc2a88a2f32bab8a14209713c19aaf14d7652a45.zip
test: use common.fixturesDir almost everywhere
Updating tests to use `common.fixturesDir` whenever possible/reasonable. Left out things like tests for `path` and `require.resolve`. PR-URL: https://github.com/nodejs/node/pull/6997 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'test/parallel/test-require-json.js')
-rw-r--r--test/parallel/test-require-json.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/parallel/test-require-json.js b/test/parallel/test-require-json.js
index bcb7f6ab7f..ac70381c05 100644
--- a/test/parallel/test-require-json.js
+++ b/test/parallel/test-require-json.js
@@ -1,9 +1,10 @@
'use strict';
-require('../common');
+var common = require('../common');
+var path = require('path');
var assert = require('assert');
try {
- require('../fixtures/invalid.json');
+ require(path.join(common.fixturesDir, 'invalid.json'));
} catch (err) {
var re = /test[\/\\]fixtures[\/\\]invalid.json: Unexpected string/;
var i = err.message.match(re);