forked from requirejs/requirejs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes requirejs#344, do not find obj.require calls for runtime depend…
…ency scanning
- Loading branch information
Showing
6 changed files
with
46 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
define(function (require) { | ||
if (typeof obj !== 'undefined') { | ||
obj.require('bad'); | ||
} | ||
return { | ||
name: 'c' | ||
}; | ||
}); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
require({ | ||
baseUrl: './' | ||
}, | ||
['a', 'c'], | ||
function(a, c) { | ||
doh.register( | ||
'cjsDotRequire', | ||
[ | ||
function cjsDotRequire(t){ | ||
t.is('a', a.name); | ||
t.is('b', a.b.name); | ||
t.is('c', c.name); | ||
} | ||
] | ||
); | ||
doh.run(); | ||
} | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>require.js: Skipping false obj.require('') Test</title> | ||
<script type="text/javascript" src="../../require.js"></script> | ||
<script type="text/javascript" src="../doh/runner.js"></script> | ||
<script type="text/javascript" src="../doh/_browserRunner.js"></script> | ||
<script type="text/javascript" src="cjsDotRequire-tests.js"></script> | ||
</head> | ||
<body> | ||
<h1>require.js: Skipping false obj.require('') Test</h1> | ||
<p>Test for <a href="https://github.com/jrburke/requirejs/issues/344">Issue 344</a>. | ||
Make sure modules that have obj.require() calls do not get found as dependencies.</p> | ||
<p>Check console for messages</p> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters