mirror of https://github.com/lukechilds/node.git
Browse Source
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>v6.x
Bryan English
9 years ago
committed by
Evan Lucas
15 changed files with 31 additions and 27 deletions
@ -1,9 +1,10 @@ |
|||||
'use strict'; |
'use strict'; |
||||
require('../common'); |
var common = require('../common'); |
||||
|
var path = require('path'); |
||||
var assert = require('assert'); |
var assert = require('assert'); |
||||
|
|
||||
assert.throws(function() { |
assert.throws(function() { |
||||
require('internal/freelist'); |
require('internal/freelist'); |
||||
}); |
}); |
||||
|
|
||||
assert(require('../fixtures/internal-modules') === 42); |
assert(require(path.join(common.fixturesDir, 'internal-modules')) === 42); |
||||
|
@ -1,9 +1,9 @@ |
|||||
'use strict'; |
'use strict'; |
||||
require('../common'); |
var common = require('../common'); |
||||
var assert = require('assert'); |
var assert = require('assert'); |
||||
var path = require('path'); |
var path = require('path'); |
||||
var fs = require('fs'); |
var fs = require('fs'); |
||||
|
|
||||
var fixture = path.join(__dirname, '../fixtures/x.txt'); |
var fixture = path.join(common.fixturesDir, 'x.txt'); |
||||
|
|
||||
assert.equal('xyz\n', fs.readFileSync(fixture)); |
assert.equal('xyz\n', fs.readFileSync(fixture)); |
||||
|
Loading…
Reference in new issue