Closed segrey closed 3 years ago
Likely, this causes https://youtrack.jetbrains.com/issue/WEB-50713.
Looks like the problem is that forkProcessDirectOutputCapture converts task.overrides.karma-config
(value: apps/my-app/karma conf.js
, without double quotes) to --karma-config="apps/my-app/karma conf.js"
and then, parseRunOpts converts args
containing --karma-config="apps/my-app/karma conf.js"
to opts.runOptions.karmaConfig
(value: "apps/my-app/karma conf.js"
, with wrapping double quotes)
Then, options.karmaConfig="apps/my-app/karma conf.js"
(with double quotes) is passed to resolve(context.workspaceRoot, options.karmaConfig)
in Angular where it's resolved to an incorrect /home/segrey/example/my-workspace/"apps/my-app/karma conf.js"
.
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.
Current Behavior
Error when running Karma tests if path to
karma.conf.js
contains space.Expected Behavior
Karma tests are run.
Steps to Reproduce
Or clone https://github.com/segrey/nx-karma-path-with-space-example.
ng test my-app --karma-config apps/my-app/karma.conf.js
. Tests are run successfully.karma.conf.js
, but now with a space in its path. For example, to achieve this you can copykarma.conf.js
to a file with a space in name:Environment