Skip to content

Commit

Permalink
Test if injecting matches amount of tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
mtusnio committed Oct 29, 2024
1 parent d598c5f commit f0a9d1b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/setup.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ test("install sets up the context menus properly", async () => {
{
tabId: 1,
url: "https://test.local"
},
{
tabId: 2,
url: "https://test-2.local"
}
]);
const insertCSS = jest.spyOn(chrome.scripting, "insertCSS").mockReturnValue();
Expand All @@ -35,8 +39,8 @@ test("install sets up the context menus properly", async () => {
contexts: ["action"]
})
expect(addListener).toHaveBeenCalled()
expect(insertCSS).toHaveBeenCalledTimes(1)
expect(executeScript).toHaveBeenCalledTimes(1)
expect(insertCSS).toHaveBeenCalledTimes(2)
expect(executeScript).toHaveBeenCalledTimes(2)
})

test("activate extension configures the dictionary, changes enabled status and changes the badge", async () => {
Expand Down

0 comments on commit f0a9d1b

Please sign in to comment.