Skip to content

Commit

Permalink
fix(test): use path.posix to allow cross platform testing
Browse files Browse the repository at this point in the history
path.join resolves to Windows paths containing back slashes.

All the tests use Unix paths containing forward slashes.

Node doesn't care about using paths with forward slashes on Windows, but will
always return paths with back slashes. Using path.posix means the tests can be
cross platform.
  • Loading branch information
Barrie Treloar authored and NicolasPetton committed Nov 14, 2019
1 parent e950165 commit 6a4c38e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/helpers/workspace.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const { existsSync, readFileSync, readdirSync, statSync } = require("fs");
const { join, resolve, basename, dirname } = require("path");
const { join, resolve, basename, dirname } = require("path").posix;
const { URL, parse } = require("url");

const projectFilename = ".indium.json";
Expand Down

0 comments on commit 6a4c38e

Please sign in to comment.