cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject js commit: CB-13232: added test for cordova's unique local style require
Date Thu, 31 Aug 2017 18:33:36 GMT
Repository: cordova-js
Updated Branches:
  refs/heads/master f623343b9 -> 74a4adc2d


CB-13232: added test for cordova's unique local style require

 This closes #148


Project: http://git-wip-us.apache.org/repos/asf/cordova-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-js/commit/74a4adc2
Tree: http://git-wip-us.apache.org/repos/asf/cordova-js/tree/74a4adc2
Diff: http://git-wip-us.apache.org/repos/asf/cordova-js/diff/74a4adc2

Branch: refs/heads/master
Commit: 74a4adc2d0fddb1e0cfb9be1961494ef0afc9893
Parents: f623343
Author: Steve Gill <stevengill97@gmail.com>
Authored: Wed Aug 30 17:47:09 2017 -0700
Committer: Steve Gill <stevengill97@gmail.com>
Committed: Thu Aug 31 11:33:31 2017 -0700

----------------------------------------------------------------------
 test/test.require.js | 10 ++++++++++
 1 file changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/74a4adc2/test/test.require.js
----------------------------------------------------------------------
diff --git a/test/test.require.js b/test/test.require.js
index c7e2285..ec40a24 100644
--- a/test/test.require.js
+++ b/test/test.require.js
@@ -145,5 +145,15 @@ describe("require + define", function () {
             define("a", factory);
             require("a");
         });
+
+        it("can handle multiple defined modules that use cordova's unique handling of relative
require paths", function () {
+            define("plugin.ios.foo", function (require, exports, module) {
+                module.exports = require("./bar") * 2;
+            });
+            define("plugin.ios.bar", function (require, exports, module) {
+                module.exports = 2;
+            });
+            expect(require("plugin.ios.foo")).toEqual(4);
+        });
     });
 });


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message