summaryrefslogtreecommitdiff
path: root/test/sequential/test-module-loading.js
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2015-09-26 15:49:04 -0700
committerRich Trott <rtrott@gmail.com>2015-09-28 11:15:06 -0700
commit44efd66132f9f9058d7ead0547d9ab2d3e06b528 (patch)
tree0393f0c662fafc87c49905547c9b71375baa8891 /test/sequential/test-module-loading.js
parent680dda802393ef1513a8a84a353dfc2ecfacacb2 (diff)
downloadandroid-node-v8-44efd66132f9f9058d7ead0547d9ab2d3e06b528.tar.gz
android-node-v8-44efd66132f9f9058d7ead0547d9ab2d3e06b528.tar.bz2
android-node-v8-44efd66132f9f9058d7ead0547d9ab2d3e06b528.zip
test: replace deprecated util.debug() calls
common.debug() is just util.debug() and emits a deprecation notice. Per docs, use console.error() instead. PR-URL: https://github.com/nodejs/node/pull/3082 Reviewed-By: Michaƫl Zasso <mic.besace@gmail.com>
Diffstat (limited to 'test/sequential/test-module-loading.js')
-rw-r--r--test/sequential/test-module-loading.js20
1 files changed, 10 insertions, 10 deletions
diff --git a/test/sequential/test-module-loading.js b/test/sequential/test-module-loading.js
index dfca2e4202..94aa36240b 100644
--- a/test/sequential/test-module-loading.js
+++ b/test/sequential/test-module-loading.js
@@ -4,7 +4,7 @@ var assert = require('assert');
var path = require('path');
var fs = require('fs');
-common.debug('load test-module-loading.js');
+console.error('load test-module-loading.js');
// assert that this is the main module.
assert.equal(require.main.id, '.', 'main module should have id of \'.\'');
@@ -56,36 +56,36 @@ assert.equal('D', d4.D());
assert.ok((new a.SomeClass()) instanceof c.SomeClass);
-common.debug('test index.js modules ids and relative loading');
+console.error('test index.js modules ids and relative loading');
var one = require('../fixtures/nested-index/one'),
two = require('../fixtures/nested-index/two');
assert.notEqual(one.hello, two.hello);
-common.debug('test index.js in a folder with a trailing slash');
+console.error('test index.js in a folder with a trailing slash');
var three = require('../fixtures/nested-index/three'),
threeFolder = require('../fixtures/nested-index/three/'),
threeIndex = require('../fixtures/nested-index/three/index.js');
assert.equal(threeFolder, threeIndex);
assert.notEqual(threeFolder, three);
-common.debug('test package.json require() loading');
+console.error('test package.json require() loading');
assert.equal(require('../fixtures/packages/main').ok, 'ok',
'Failed loading package');
assert.equal(require('../fixtures/packages/main-index').ok, 'ok',
'Failed loading package with index.js in main subdir');
-common.debug('test cycles containing a .. path');
+console.error('test cycles containing a .. path');
var root = require('../fixtures/cycles/root'),
foo = require('../fixtures/cycles/folder/foo');
assert.equal(root.foo, foo);
assert.equal(root.sayHello(), root.hello);
-common.debug('test node_modules folders');
+console.error('test node_modules folders');
// asserts are in the fixtures files themselves,
// since they depend on the folder structure.
require('../fixtures/node_modules/foo');
-common.debug('test name clashes');
+console.error('test name clashes');
// this one exists and should import the local module
var my_path = require('../fixtures/path');
assert.ok(common.indirectInstanceOf(my_path.path_func, Function));
@@ -102,7 +102,7 @@ try {
assert.equal(require('path').dirname(__filename), __dirname);
-common.debug('load custom file types with extensions');
+console.error('load custom file types with extensions');
require.extensions['.test'] = function(module, filename) {
var content = fs.readFileSync(filename).toString();
assert.equal('this is custom source\n', content);
@@ -115,7 +115,7 @@ assert.equal(require('../fixtures/registerExt').test, 'passed');
// unknown extension, load as .js
assert.equal(require('../fixtures/registerExt.hello.world').test, 'passed');
-common.debug('load custom file types that return non-strings');
+console.error('load custom file types that return non-strings');
require.extensions['.test'] = function(module, filename) {
module.exports = {
custom: 'passed'
@@ -139,7 +139,7 @@ try {
}
// Check load order is as expected
-common.debug('load order');
+console.error('load order');
var loadOrder = '../fixtures/module-load-order/',
msg = 'Load order incorrect.';