Skip to content

Commit 07b0ccf

Browse files
Trying to get tests working on Windows
1 parent f875d2c commit 07b0ccf

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ os:
1515
# - osx
1616
- windows
1717

18-
script: npm run test
18+
script: npm run coverage
1919

2020
after_success:
2121
# send code-coverage data to Coveralls

test/specs/version-hooks.spec.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
"use strict";
22

3+
const fs = require("fs");
34
const cli = require("../fixtures/cli");
45
const mocks = require("../fixtures/mocks");
56
const files = require("../fixtures/files");
@@ -9,6 +10,16 @@ const chai = require("chai");
910
chai.should();
1011

1112
describe.only("npm version hooks", () => {
13+
before("Delete npm.cmd from node_modules on Windows", () => {
14+
if (process.platform === "win32") {
15+
fs.unlinkSync("node_modules\\.bin\\npm");
16+
fs.unlinkSync("node_modules\\.bin\\npm.js");
17+
fs.unlinkSync("node_modules\\.bin\\npm.cmd");
18+
fs.unlinkSync("node_modules\\.bin\\npm-cli");
19+
fs.unlinkSync("node_modules\\.bin\\npm-cli.js");
20+
fs.unlinkSync("node_modules\\.bin\\npm-cli.cmd");
21+
}
22+
});
1223

1324
it("should run the preversion script before updating the version number", () => {
1425
files.create("package.json", {

0 commit comments

Comments
 (0)