You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
describe("common module: Localiser",function(){describe("init()",function(){it("replaces html lang attribute",function(){conststubGetUiLang=sinon.stub().returns("EXA-01");browser.i18n.getUILanguage=stubGetUiLang;Localiser.init();chai.assert.strictEqual(document.querySelector("html").getAttribute("lang"),"EXA-01","did not set language code correctly");chai.assert(stubGetUiLang.calledOnceWithExactly(),"i18n.getUILanguage was not called correctly");});it("replaces '__MSG_extensionNameShort__' as text content",function(){setTestHtml('<span id="testExtensionName" class="message-text" data-i18n="__MSG_extensionNameShort__">What is my name?</span>');conststubGetMessage=sinon.stub().withArgs("extensionNameShort").returns("My fake extension name 101");browser.i18n.getMessage=stubGetMessage;Localiser.init();chai.assert(stubGetMessage.calledOnceWithExactly("extensionNameShort"),"i18n.getMessage was not called correctly");chai.assert.strictEqual(document.getElementById("testExtensionName").innerHTML,"My fake extension name 101","did not replace span with correct content");});});afterEach(function(){console.log("sdds");// restore the default sandboxsinon.restore();});});
The afterEach triggers the eslint rule, but actually, it is run after each of the inner tests, too (verifiable with the console.log), as such it is not about a single test case.
The text was updated successfully, but these errors were encountered:
The
afterEach
triggers the eslint rule, but actually, it is run after each of the inner tests, too (verifiable with the console.log), as such it is not about a single test case.The text was updated successfully, but these errors were encountered: