-
Notifications
You must be signed in to change notification settings - Fork 83
--open-path and --open-app treated as strings, not JSON. #60
Conversation
Codecov Report
@@ Coverage Diff @@
## master #60 +/- ##
=======================================
Coverage 92.19% 92.19%
=======================================
Files 7 7
Lines 269 269
=======================================
Hits 248 248
Misses 21 21
Continue to review full report at Codecov.
|
Thanks for the PR 🍺 Which test was failing and why? That's a strange assertion as nothing would've passed CI previously if we had failing tests. |
@shellscape Strange indeed! 😄 $ npm install
# ...
$ npm test Here is my output: https://hastebin.com/napesipuyo.coffeescript This is macOS High Sierra, though it's similar to the result I got running on Linux earlier. |
The specific relevant test I was referring to is: webpack-serve Options
17) should accept an open:Object option Though that's certainly not the only failing test. |
Yeah I'm on High Sierra here too, no issues with the tests. At any rate, note the last example here: https://github.com/sindresorhus/opn#usage. That's why we're using JSON.parse, as the value can be an array for So there's actually no tests for either option in the |
@shellscape I'm running the tests on the master branch, so I'm not sure what to make of this. Are you sure you don't have anything set up in your local environment that isn't dependent upon the repo? If you could verify in a new clone/maybe even a new machine that would be awesome, just so we can make sure it's me that is crazy. 😉 Re: the API, I think passing a JSON literal as a command line argument seems a bit fishy. Wouldn't it be better to make it a comma separated list - webpack-server ... --open-path a,b,c Then in the code you can just do What do you think? |
Yes. Each CI run is a fresh clone in an independent environment. There's something awry on your end I'm afraid.
I think no. If the user wants that advanced functionality, they can be explicit in what they need. We don't need to go creating any special rules around that. |
It looks like your CI server is using a node module cache. Have you tried invalidating it? If that's not the issue, I'm officially out of ideas.. I've now cloned many times on two computers, multiple Wi-Fi networks, different Node versions, and I'm still unable to make the tests pass locally. Bummer! 😞
Fair enough. As long as I can use a plain string for |
Thanks for your work on this. The fix needed quite a bit more additional work, so #72 was created. That PR supersedes this one, so we're going to close this one up. Look for this fix to be published in the next day or so. |
Thanks! 😄 |
This PR contains a:
Motivation / Use-Case
Seems like we were
JSON.parse
ing theopen.app
andopen.path
string properties for no reason... maybe I missed something? All I know is that my server works now. 😄Additional Info
I wanted to fix or update tests, but it seems the relevant test was failing for me before and after I made the change.