Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Added unit test for checking that path is handled correctly in manifest object. #84

Merged
merged 1 commit into from Feb 15, 2012
Jump to file or symbol
Failed to load files and symbols.
+26 −0
Split
View
@@ -38,6 +38,8 @@
<script type="text/javascript" src="/tests/amd/amd.js"></script>
<script type="text/javascript" src="/tests/amd/interface.js"></script>
+
+ <script type="text/javascript" src="/tests/manifest/manifest.js"></script>
</head>
<body>
<h1 id="qunit-header">QUnit Test Suite</h1>
View
@@ -0,0 +1,24 @@
+module("Manifest Tests", {
+ setup: function() {
+ if (localStorage) {
+ localStorage.clear();
+ }
+ Inject.reset();
+ },
+ teardown: function() {
+ if (localStorage) {
+ localStorage.clear();
+ }
+ }
+});
+
+asyncTest("Require Module With Different Name", 1, function() {
+ require.manifest({
+ "myMath" : "math"
+ });
+
+ require.ensure(["myMath"], function() {
+ ok(true, "successfully called module by alternate name via manifest mapping");
+ start();
+ });
+});