Testing Finch GraphQL
Using Finch GraphQL allows you to connect background and client scripts together in tests allowing you to write some integration tests that cover both background and client scripts. It is currently recommended that you use async messaging in your tests. This makes it super simple to write integration tests for Finch GraphQL. You can do something like this to swap the connection for tests.
#
Mocking Messaging ConnectionsIf you are sending messages via async messages you can use the following code to connect your api with content scripts.