Skip to content

Commit f97f1a6

Browse files
committed
Tests: RequireJS 2.1.x exposes .undef to undefine module
1 parent 713b402 commit f97f1a6

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

tests/jquery.testHelper.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,7 @@
9090
reloads: {},
9191

9292
reloadModule: function(libName){
93-
var deferred = $.Deferred(),
94-
context;
93+
var deferred = $.Deferred();
9594

9695
// where a module loader isn't defined use the old way
9796
if( !window.require ) {
@@ -107,11 +106,7 @@
107106
}
108107

109108
//Clear internal cache of module inside of require
110-
context = require.s.contexts._;
111-
delete context.defined[libName];
112-
delete context.specified[libName];
113-
delete context.loaded[libName];
114-
delete context.urlFetched[require.toUrl(libName + '.js')];
109+
requirejs.undef( libName );
115110

116111
require(
117112
{

0 commit comments

Comments
 (0)