updated testing setup to understand my api calls
This commit is contained in:
parent
328c926ddf
commit
c29c0694fb
2 changed files with 14 additions and 2 deletions
|
@ -245,7 +245,7 @@ const assignManager = {
|
|||
},
|
||||
|
||||
async getPermissions() {
|
||||
const {permissions} = await browser.permissions.getAll()
|
||||
const {permissions} = await browser.permissions.getAll();
|
||||
permissions.includes("bookmarks") ? this.makeBookmarksMenu() : browser.contextMenus.remove(this.OPEN_IN_CONTAINER);
|
||||
},
|
||||
|
||||
|
|
|
@ -58,7 +58,16 @@ module.exports = () => {
|
|||
contextualIdentities: {
|
||||
create: sinon.stub(),
|
||||
get: sinon.stub(),
|
||||
query: sinon.stub().resolves([])
|
||||
query: sinon.stub().resolves([]),
|
||||
onCreated: {
|
||||
addListener: sinon.stub()
|
||||
},
|
||||
onUpdated: {
|
||||
addListener: sinon.stub()
|
||||
},
|
||||
onRemoved: {
|
||||
addListener: sinon.stub()
|
||||
}
|
||||
},
|
||||
contextMenus: {
|
||||
create: sinon.stub(),
|
||||
|
@ -82,6 +91,9 @@ module.exports = () => {
|
|||
},
|
||||
extension: {
|
||||
getURL: sinon.stub().returns("moz-extension://multi-account-containers/confirm-page.html")
|
||||
},
|
||||
permissions: {
|
||||
getAll: sinon.stub().returns({"permissions": ["bookmarks"]})
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue