-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
for #26: refactor (some) filterRequest code into modules and test #75
Conversation
@rpl - r? Rather than explicitly inject Does that strategy make sense (for now™)? |
@groovecoder absolutely, this strategy sounds great to me I'll look the rest of these patches asap. |
const {log} = require('./log') | ||
|
||
var TESTPILOT_TELEMETRY_CHANNEL = 'testpilot-telemetry' | ||
var testpilotPingChannel = new BroadcastChannel(TESTPILOT_TELEMETRY_CHANNEL) | ||
|
||
// HACK: Start with active tab id = 1 when browser starts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@groovecoder This inline comment sounds interesting, may I ask you some additional details about this?
(e.g. some additional info about the scenario and the issue)
This refactoring is going great! the background page is still pretty big, and big chunks of what the background page is doing needs more testing, but we are getting there! We are now very near to be able to fully pass eslint checks once this PR will be merged, I'm going to open a new PR which adds eslint to this repo, it can be helpful to keep the current conventions applied over the time (or enforce more conventions over the time). |
@groovecoder nevermind, you can ignore the part of the above comment related to |
Thanks @rpl. May test |
In fact, I'm almost sure that hack can be fixed in #76 where I properly use a window event handler to assign |
This doesn't do everything, but it helps ...
allowRequest
function in a newrequests
module covered by testshostInBlocklist
function inlists
module covered by testshostInEntity
function inlists
module covered by tests using newentitylist-fixture.json
initTestPilotPingChannel
function inbackground.js
to reduce window/global abuse/dependencyallHosts
function fromcanonicalize
module tolists
module where it's used moreTotal of 8 new tests with 14 new assertions.