nathanboktae / mocha-phantomjs

:coffee: :ghost: Run client-side mocha tests in the command line through phantomjs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

I can only get it to work with absolute paths.....

dietergeerts opened this issue · comments

I'm trying to get this to work with the help of the readme and the webpack solution in some of the other issues here. All seems fine, but I get an error Error loading resource file:///assets/test.71fdc68c4cbfb97f15c5.js (203). Details: Error opening /assets/test.71fdc68c4cbfb97f15c5.js: The system cannot find the path specified. .

If I however use an absolute path like C:/....... , then it loads it, but that can't be the intention imho.

Is there any setting, or do I need to specify some things to be able to have it working with relative paths?

No, all the tests run fine with relative paths. Since you're a windows user you have extra pain on you from which shell you use, which slashes you use, and if you escape them.

Relative paths really don't work. But since I use webpack, I inject the path through the HtmlWebpackPlugin and it's template feature. I do however run the shell script from the wepack shell plugin after it's done, so maybe that has something to do with it. Don't know, but injecting the absolute path works, also on the CI