Skip to content

Commit

Permalink
Fix can get data directory test for Windows
Browse files Browse the repository at this point in the history
One of the unit tests was assuming a forward slash seperator,
even though the implementation uses path.join(). This meant the
test would fail on Windows platforms because on Windows path.join()
would use a back slash path seperator.

Type: Bug Fix
  • Loading branch information
psettle authored and tooomm committed Jul 18, 2021
1 parent ac5b481 commit 593fba2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/data.spec.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const assert = require("assert");
const path = require("path");
const data = require("./data");
const {describe, it} = require("mocha");
const { describe, it } = require("mocha");

describe("Acceptance tests for Data functions", () => {
describe("can find certain starter sets", () => {
Expand All @@ -18,7 +18,7 @@ describe("Acceptance tests for Data functions", () => {

assert(dataDir);
assert(path.isAbsolute(dataDir));
assert.equal(dataDir, `${repoRoot}/data`);
assert.strictEqual(dataDir, path.join(repoRoot, "data"));
});
});
});

0 comments on commit 593fba2

Please sign in to comment.