eslint - rules updated

This commit is contained in:
Sebastian Seedorf
2020-11-19 22:22:14 +01:00
parent b79c2f96cd
commit 5c31dc285a
13 changed files with 100 additions and 83 deletions

View File

@@ -7,13 +7,13 @@ import {JSDOM} from 'jsdom';
// @ts-ignore
import * as rewire from 'rewire';
describe("frontend:index", () => {
const updateUserName = rewire("../src/index").__get__("updateUserName") as (name: string) => void;
describe('frontend:index', () => {
const updateUserName = rewire('../src/index').__get__('updateUserName') as (name: string) => void;
beforeEach(() => {
const dom = new JSDOM(
`
<html>
<html lang="en">
<body>
</body>
</html>
@@ -27,13 +27,13 @@ describe("frontend:index", () => {
global.document = dom.window.document;
});
it("updateUserName", (done) => {
const NAME = "Patrick Star";
const RESULT = "This user name is fetched with Javascript: Patrick Star";
it('updateUserName', (done) => {
const NAME = 'Patrick Star';
const RESULT = 'This user name is fetched with Javascript: Patrick Star';
updateUserName(NAME);
// give the browser a chance to update the DOM
setTimeout(() => {
const span = document.getElementsByTagName("span");
const span = document.getElementsByTagName('span');
expect(span).to.not.be.null;
expect(span.length).to.be.greaterThan(0);
expect(span[0].innerText).to.deep.equal(RESULT);