Feature test container sync initialization

This commit is contained in:
stoically
2019-12-19 07:49:41 +01:00
committed by Kendall Werts
parent be3904cee8
commit 26cd3c3cc8
2 changed files with 70 additions and 0 deletions
+4
View File
@@ -5,6 +5,7 @@ if (!process.listenerCount("unhandledRejection")) {
const path = require("path");
const chai = require("chai");
const sinonChai = require("sinon-chai");
const crypto = require("crypto");
global.sinon = require("sinon");
global.expect = chai.expect;
chai.should();
@@ -29,6 +30,9 @@ global.buildDom = async ({background = {}, popup = {}}) => {
...background.jsom,
beforeParse(window) {
window.browser.permissions.getAll.resolves({permissions: ["bookmarks"]});
window.crypto = {
getRandomValues: arr => crypto.randomBytes(arr.length),
};
}
}
};