Technical: Increase unit test coverage of the Browserker Scanner

Proposal

This is currently a large file with many dependencies. The file is tested fairly well using integration and end-to-end tests, however, it would be of benefit if it could be simplified such that unit tests could be written.

Test cases

  • Errors returned when the context is considered to be "done"

Reference

https://gitlab.com/gitlab-org/security-products/analyzers/browserker/-/merge_requests/427#note_807849872

Edited by Cameron Swords