Skip to content

Commit

Permalink
Update .travis.yml
Browse files Browse the repository at this point in the history
Remove unsupported node versions
  • Loading branch information
jhnns committed Nov 11, 2017
1 parent b6cc407 commit ec2175b
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 24 deletions.
5 changes: 2 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
language: node_js
node_js:
- "0.10"
- "0.12"
- "4"
- "5"
- "6"
- "8"
- "9"

script:
- npm test
Expand Down
15 changes: 0 additions & 15 deletions lib/moduleEnv.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,6 @@ function load(targetModule) {
reset();
}

function compileJavaScript(src, targetPath) {
return babelCore.transform(stripBOM(src), {
plugins: [transformBlockScoping],
retainLines: true,
filename: targetPath
}).code;
}

function compileCoffeeScript(src, targetPath) {
return coffee.compile(stripBOM(src), {
filename: targetPath,
bare: true
});
}

function reset() {
Module.wrapper[0] = moduleWrapper0;
Module.wrapper[1] = moduleWrapper1;
Expand Down
2 changes: 1 addition & 1 deletion test/rewire.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ describe("rewire", function () {
fs.renameSync(fakeNodeModules, path.resolve(__dirname, "../testLib/node_modules"));
}
});
require("../testLib/sharedTestCases.js");
require("../testLib/sharedTestCases.js")();
it("should also work with CoffeeScript", function () {
var coffeeModule;

Expand Down
6 changes: 3 additions & 3 deletions testLib/constModule.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
const someOtherModule = require("./someOtherModule");
const language = "nl";

module.exports.getLang = () => {
exports.getLang = () => {
return language;
}
};

exports.getOtherModuleName = () => {
return someOtherModule.name;
}
};

exports.filename = __filename;
exports.dirname = __dirname;
4 changes: 2 additions & 2 deletions testLib/sharedTestCases.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function checkForTypeError(err) {
expect(err.constructor).to.be(TypeError);
}

describe(typeof testEnv === "undefined"? "(node)": "(" + testEnv + ")", function () {
module.exports = function () {

it("should work like require()", function () {
rewire("./moduleA.js").getFilename();
Expand Down Expand Up @@ -390,4 +390,4 @@ describe(typeof testEnv === "undefined"? "(node)": "(" + testEnv + ")", function
expect(constModule.dirname).to.equal(require("./constModule").dirname);
});

});
};

0 comments on commit ec2175b

Please sign in to comment.