Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/rewire.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Ewald <johannes.ewald@peerigon.com>2015-11-14 20:59:06 +0300
committerJohannes Ewald <johannes.ewald@peerigon.com>2015-11-14 20:59:06 +0300
commit5a8ba82b39f69f3750ddf83c6f6fc6f6e2ecb2a2 (patch)
treea411f44c7c03d99f4412a6bcdbf2798b550fb733
parentac0c8a37250513b49670739ac6f95a5805687251 (diff)
Move shared test cases into lib folder
Since new versions of npm respect the .npmignore even when it comes from git urls, we need to move the shared test cases into the lib folder in order to provide these cases to other modules which port rewire's functionality to other environments. As discussed at https://github.com/jhnns/rewire-webpack/pull/18
-rw-r--r--lib/testModules/debuggerModule.js (renamed from test/testModules/debuggerModule.js)12
-rw-r--r--lib/testModules/emptyModule.js (renamed from test/testModules/emptyModule.js)8
-rw-r--r--lib/testModules/implicitGlobal.js (renamed from test/testModules/implicitGlobal.js)0
-rw-r--r--lib/testModules/module.coffee (renamed from test/testModules/module.coffee)0
-rw-r--r--lib/testModules/moduleA.js (renamed from test/testModules/moduleA.js)0
-rw-r--r--lib/testModules/moduleB.js (renamed from test/testModules/moduleB.js)0
-rw-r--r--lib/testModules/node_modules/rewire/package.json (renamed from test/testModules/node_modules/rewire/package.json)0
-rw-r--r--lib/testModules/sharedTestCases.js (renamed from test/testModules/sharedTestCases.js)0
-rw-r--r--lib/testModules/someOtherModule.js (renamed from test/testModules/someOtherModule.js)0
-rw-r--r--lib/testModules/strictModule.js (renamed from test/testModules/strictModule.js)12
-rw-r--r--lib/testModules/throwError.js (renamed from test/testModules/throwError.js)0
-rw-r--r--test/rewire.test.js6
12 files changed, 19 insertions, 19 deletions
diff --git a/test/testModules/debuggerModule.js b/lib/testModules/debuggerModule.js
index 5a79b53..9d2b7df 100644
--- a/test/testModules/debuggerModule.js
+++ b/lib/testModules/debuggerModule.js
@@ -1,7 +1,7 @@
-"use strict"; // run code in ES5 strict mode
-
-var myNumber = 0;
-
-module.exports = function () {
- myNumber = 1;
+"use strict"; // run code in ES5 strict mode
+
+var myNumber = 0;
+
+module.exports = function () {
+ myNumber = 1;
}; \ No newline at end of file
diff --git a/test/testModules/emptyModule.js b/lib/testModules/emptyModule.js
index b9a0f90..8b82a74 100644
--- a/test/testModules/emptyModule.js
+++ b/lib/testModules/emptyModule.js
@@ -1,5 +1,5 @@
-"use strict"; // run code in ES5 strict mode
-
-var someVar;
-
+"use strict"; // run code in ES5 strict mode
+
+var someVar;
+
// Comment on file end. Hope this won't break anything \ No newline at end of file
diff --git a/test/testModules/implicitGlobal.js b/lib/testModules/implicitGlobal.js
index 3048742..3048742 100644
--- a/test/testModules/implicitGlobal.js
+++ b/lib/testModules/implicitGlobal.js
diff --git a/test/testModules/module.coffee b/lib/testModules/module.coffee
index 5487878..5487878 100644
--- a/test/testModules/module.coffee
+++ b/lib/testModules/module.coffee
diff --git a/test/testModules/moduleA.js b/lib/testModules/moduleA.js
index b9dce87..b9dce87 100644
--- a/test/testModules/moduleA.js
+++ b/lib/testModules/moduleA.js
diff --git a/test/testModules/moduleB.js b/lib/testModules/moduleB.js
index 62b2d3f..62b2d3f 100644
--- a/test/testModules/moduleB.js
+++ b/lib/testModules/moduleB.js
diff --git a/test/testModules/node_modules/rewire/package.json b/lib/testModules/node_modules/rewire/package.json
index d8927cd..d8927cd 100644
--- a/test/testModules/node_modules/rewire/package.json
+++ b/lib/testModules/node_modules/rewire/package.json
diff --git a/test/testModules/sharedTestCases.js b/lib/testModules/sharedTestCases.js
index ccbafa3..ccbafa3 100644
--- a/test/testModules/sharedTestCases.js
+++ b/lib/testModules/sharedTestCases.js
diff --git a/test/testModules/someOtherModule.js b/lib/testModules/someOtherModule.js
index da38f4c..da38f4c 100644
--- a/test/testModules/someOtherModule.js
+++ b/lib/testModules/someOtherModule.js
diff --git a/test/testModules/strictModule.js b/lib/testModules/strictModule.js
index 140dd2a..5d6e387 100644
--- a/test/testModules/strictModule.js
+++ b/lib/testModules/strictModule.js
@@ -1,7 +1,7 @@
-"use strict"; // run code in ES5 strict mode
-
-function doSomethingUnstrict() {
- var caller = arguments.callee.caller; // this should throw an error as a proof that strict mode is on
-}
-
+"use strict"; // run code in ES5 strict mode
+
+function doSomethingUnstrict() {
+ var caller = arguments.callee.caller; // this should throw an error as a proof that strict mode is on
+}
+
exports.doSomethingUnstrict = doSomethingUnstrict; \ No newline at end of file
diff --git a/test/testModules/throwError.js b/lib/testModules/throwError.js
index 9bdf68b..9bdf68b 100644
--- a/test/testModules/throwError.js
+++ b/lib/testModules/throwError.js
diff --git a/test/rewire.test.js b/test/rewire.test.js
index 1ac0129..900e0fc 100644
--- a/test/rewire.test.js
+++ b/test/rewire.test.js
@@ -17,13 +17,13 @@ describe("rewire", function () {
}
});
it("should pass all shared test cases", function () {
- require("./testModules/sharedTestCases.js");
+ require("../lib/testModules/sharedTestCases.js");
});
it("should also work with CoffeeScript", function () {
var coffeeModule;
rewire = require("../");
- coffeeModule = rewire("./testModules/module.coffee");
+ coffeeModule = rewire("../lib/testModules/module.coffee");
coffeeModule.__set__("fs", {
readFileSync: function () {
return "It works!";
@@ -31,4 +31,4 @@ describe("rewire", function () {
});
expect(coffeeModule.readFileSync()).to.be("It works!");
});
-}); \ No newline at end of file
+});