Skip to content

Commit

Permalink
Fix tests on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
matz3 committed Mar 5, 2020
1 parent a689fd2 commit ed0032c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/lib/ui5framework/npm/Installer.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const test = require("ava");
const sinon = require("sinon");
const path = require("path");

const Installer = require("../../../../lib/ui5Framework/npm/Installer");

Expand All @@ -19,8 +20,8 @@ test.serial("Installer: constructor", (t) => {
ui5HomeDir: "/ui5Home/"
});
t.true(installer instanceof Installer, "Constructor returns instance of class");
t.is(installer._baseDir, "/ui5Home/framework/packages");
t.is(installer._lockDir, "/ui5Home/framework/locks");
t.is(installer._baseDir, path.join("/ui5Home/", "framework", "packages"));
t.is(installer._lockDir, path.join("/ui5Home/", "framework", "locks"));
});

test.serial("Installer: constructor requires 'cwd'", (t) => {
Expand Down Expand Up @@ -75,7 +76,7 @@ test.serial("Installer: _synchronize", async (t) => {
"_getLockPath should be called with expected args");

t.is(t.context.mkdirpStub.callCount, 1, "_mkdirp should be called once");
t.deepEqual(t.context.mkdirpStub.getCall(0).args, ["/ui5Home/framework/locks"],
t.deepEqual(t.context.mkdirpStub.getCall(0).args, [path.join("/ui5Home/", "framework", "locks")],
"_mkdirp should be called with expected args");

t.is(t.context.lockStub.callCount, 1, "_lock should be called once");
Expand Down

0 comments on commit ed0032c

Please sign in to comment.