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

Commit

Permalink
fix: fix app.css file path on windows machines
Browse files Browse the repository at this point in the history
Currently `tns test` command on windows throws the following error:
```
ERROR in ./app.js
Module not found: Error: Can't resolve '..
ode_modules
ativescript-unit-test-runnerapp.css' in 'C:\Jenkins\workspace\master-cli-test-windows\TestApp\app'
 @ ./app.js 12:93-157
Webpack compilation complete.
{ Error: Executing webpack failed with exit code 2.
    at DevicesService.<anonymous> (C:\Jenkins\workspace\master-cli-test-windows\node_modules\nativescript\lib\common\mobile\mobile-core\devices-service.js:368:38)
    at Generator.throw (<anonymous>)
    at rejected (C:\Jenkins\workspace\master-cli-test-windows\node_modules\nativescript\lib\common\mobile\mobile-core\devices-service.js:11:65)
    at process._tickCallback (internal/process/next_tick.js:68:7)
  allErrors:
   [ { Error: Executing webpack failed with exit code 2.
         at ChildProcess.childProcess.on (C:\Jenkins\workspace\master-cli-test-windows\node_modules\nativescript\lib\services\webpack\webpack-compiler-service.js:107:39)
         at ChildProcess.emit (events.js:189:13)
         at maybeClose (internal/child_process.js:970:16)
         at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5) code: 2, deviceIdentifier: 'emulator-5562'
```
  • Loading branch information
Fatme committed Jun 28, 2019
1 parent b77ecff commit 7d734d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion unit-testing-config-loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module.exports = function ({ appFullPath, projectRoot, angular, rootPagesRegExp
const testFilesRegExp = /tests\/.*\.(ts|js)/;
const runnerFullPath = join(projectRoot, "node_modules", "nativescript-unit-test-runner");
const runnerRelativePath = convertSlashesInPath(relative(appFullPath, runnerFullPath));
const appCssFilePath = join(runnerRelativePath, "app.css");
const appCssFilePath = convertSlashesInPath(join(runnerRelativePath, "app.css"));
let source = `
require("tns-core-modules/bundle-entry-points");
const runnerContext = require.context("${runnerRelativePath}", true, ${rootPagesRegExp});
Expand Down

0 comments on commit 7d734d8

Please sign in to comment.