render HTML from a static file document.body.innerHTML = __html__['testcase1.html']; }); it('injects three elements', () => { myInjectElements(window); let es = window.document.querySelector(".injected") expect(es).to.have.lengthOf(3); }); });
beforeEach(() => { // set fake browser to global variable global.browser = browserFake(); }); it('should get last created tab', async() => { const created = await browser.tabs.create({}); const tab = await myLastCreatedTab(); expect(tab.id).to.equal(created.id); }); });