Closed neoeno closed 7 years ago
@neoeno Not sure if you get notified when people 👍 your issues, but documentation improvements are always appreciated.
Closing this issue due to lack of response - If/when a PR is submitted we can continue any needed discussion
Hello Team Poltergeist! Firstly, thanks for all your great work on this project!
Scenario
Today I wanted to block my tests from accessing external web services, so I could start narrowing down and possibly eliminating those cases.
First I tried this:
It took me a little while to figure out this does nothing. Poltergeist treats an empty array as if the option isn't specified at all.
So I tried this:
Which blocked everything — including localhost. Easier to figure out, so I allowed localhost like this:
Which I found by copying from #828. Before that, I suspected we might be dealing with patterns, but the docs hadn't told me this directly. In fact it's just "*" or "?" that's allowed and everything else is escaped. Also it's a substring match, so "github.com" will also match "api.github.com".
Proposed solution
I'd like to make this a bit easier to set up. Here's what I'd like to do:
Let me know if that sounds good to you and I'll go ahead and submit a PR.