Closed epgremill3 closed 6 years ago
Ah yep this looks like a bug. Thanks for reporting! I'm not on windows but I can replicate on OSX with a relative path.
I'll try to get a fix out tomorrow but it may take until next week. Feel free to submit a PR if you have a fix of your own!
I have a potential fix for this in https://github.com/NickTomlin/protractor-flake/commit/874a08eb2f10aeb24ccf94495e97f67f88ae58ea would you mind trying that out? I don't have a windows machine so there could be something that doesn't work there.
Thanks!
Gladly! I'll try to get to it this weekend. If not, then on Monday for sure. I'll report back as soon as I've tried it. Thanks!
All right - I tested and can confirm that all of the following work:
C:\path\to\mycustomparser.js
to\mycustomparser.js
./to/mycustomparser.js
..\path\to\mycustomparser.js
I think it looks good - thanks!
This has been published to NPM as 3.0.2
. Thanks for reporting the issue!
Hello, I just started using
protractor-flake
today and I'm really liking it so far - thanks!There's one thing I've run into that I had to work around - the custom parser path seems to use
require.resolve
which seems to use__dirname
or equivalent to look for the file. However, I've installedprotractor
andprotractor-flake
globally, so I'm running my tests from a different directory than whereprotractor-flake
is installed.I did some quick tests tweaking the source and in
parsers/index.js handlePath
function if I do something like:Then it works for me. Maybe you could nest that (or some nicer equivalent) in the catch block to support relative paths from the calling directory?
Alternatively, maybe there's a better way for me to achieve this? For now I'm specifying my custom parser path on the command line with
%CD%\subdirectory\parser.js
which works due to expansion before being passed in...Thanks for considering and keep up the good work.