Skip to content
This repository was archived by the owner on Aug 7, 2021. It is now read-only.

Commit 9020c47

Browse files
author
Fatme
authored
fix: use correct slashes on windows (#851)
1 parent bd4fa9c commit 9020c47

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Diff for: unit-testing-config-loader.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
const { join, relative } = require("path");
2+
const { convertSlashesInPath } = require("./projectHelpers");
23

34
module.exports = function ({ appFullPath, projectRoot, angular, rootPagesRegExp }) {
45
// TODO: Consider to use the files property from karma.conf.js
56
const testFilesRegExp = /tests\/.*\.(ts|js)/;
67
const runnerFullPath = join(projectRoot, "node_modules", "nativescript-unit-test-runner");
7-
const runnerRelativePath = relative(appFullPath, runnerFullPath);
8+
const runnerRelativePath = convertSlashesInPath(relative(appFullPath, runnerFullPath));
89
let source = `
910
require("tns-core-modules/bundle-entry-points");
1011
const runnerContext = require.context("${runnerRelativePath}", true, ${rootPagesRegExp});
@@ -24,7 +25,7 @@ module.exports = function ({ appFullPath, projectRoot, angular, rootPagesRegExp
2425
`;
2526
}
2627

27-
const runnerEntryPointPath = join(runnerRelativePath, "bundle-app.js");
28+
const runnerEntryPointPath = convertSlashesInPath(join(runnerRelativePath, "bundle-app.js"));
2829
source += `
2930
require("${runnerEntryPointPath}");
3031
`;

0 commit comments

Comments
 (0)