node test: Remove add_dependencies().

This commit is contained in:
Steve Howell 2017-11-08 11:13:19 -08:00 committed by Tim Abbott
parent a1c5b0928e
commit cdc1bf3d5e
4 changed files with 0 additions and 11 deletions

View File

@ -94,9 +94,6 @@ like the following toward the top of your test file:
> zrequire('stream_data'); > zrequire('stream_data');
> zrequire('Filter', 'js/filter'); > zrequire('Filter', 'js/filter');
(Deprecation note: you may see code where we use `add_dependencies` or
direct `require` statements. We should use `zrequire` instead.)
For modules that you want to completely stub out, please use a pattern For modules that you want to completely stub out, please use a pattern
like this: like this:

View File

@ -4,7 +4,6 @@
}, },
"globals": { "globals": {
"assert": false, "assert": false,
"add_dependencies": false,
"casper": false, "casper": false,
"document": false, "document": false,
"set_global": false, "set_global": false,

View File

@ -16,7 +16,6 @@ if (_.isEmpty(files)) {
var namespace = require('./namespace.js'); var namespace = require('./namespace.js');
global.set_global = namespace.set_global; global.set_global = namespace.set_global;
global.patch_builtin = namespace.patch_builtin; global.patch_builtin = namespace.patch_builtin;
global.add_dependencies = namespace.add_dependencies;
global.zrequire = namespace.zrequire; global.zrequire = namespace.zrequire;
global.stub_out_jquery = namespace.stub_out_jquery; global.stub_out_jquery = namespace.stub_out_jquery;
global.with_overrides = namespace.with_overrides; global.with_overrides = namespace.with_overrides;

View File

@ -30,12 +30,6 @@ exports.zrequire = function (name, fn) {
return obj; return obj;
}; };
exports.add_dependencies = function (dct) {
_.each(dct, function (fn, name) {
exports.zrequire(name, fn);
});
};
exports.restore = function () { exports.restore = function () {
dependencies.forEach(function (name) { dependencies.forEach(function (name) {
delete global[name]; delete global[name];