Allow all configuration options of livereload to be passed through. #246
I have been looking for the test to augment by temporarily introducing a bug in the existing passing of the parameters:
When I run
Is there any other way to run tests, or does a test that tests parameter passing simply not exist presently?
Yes, I've seen those tests. Those tests do not test whether the number passed as a port is actually used, so they test something, but not parameter handover.
I take your answer as "tests that test parameter passing do not presently exist".
I'll see what I can do.
The way to avoid it I can think of is something like
Seems to me that cure is worse than the disease. What do you think?
At this point, we have three cases: Livereload is simply true, or is a number, or is an object. The possibility to add an object is new. The other two configuration options existed before.
As I found out, there was no previous test for the "number" case. There was only a test on the "true" case.
So I added that missing test for the previously-existing "number" functionality. And I also added a test for my own work. So we now have three tests instead of one.
I am not so sure the previously existing functionality is actually useable. At least on my machine, in a real-world example, both variants (true and number) kept producing a script URI along the lines of
It might be worth a consideration to simply remove the old "true" and the old "port" configuration. There is nothing you could do with those that you couldn't do with the full way, that my patch introduces.
But it might break compatibility for people who have been using the old way and for whom that worked. I'm not sure whether such people exist or don't. Those people would have to re-configure.
In short: To reduce code and tests, we could remove the two old ways, "true" and number, and only keep my new way. I'd be happy to reduce the code in that way.
What do you think, is better? Small, or compatible?