Browse Source

fix(test): use path.posix to allow cross platform testing

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.
pull/11/head
Barrie Treloar 1 year ago
committed by Nicolas Petton
parent
commit
6a4c38ef4b
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      server/helpers/workspace.js

+ 1
- 1
server/helpers/workspace.js View File

@ -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";


Loading…
Cancel
Save