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,7 +7,7 @@ import {getUserName} from '../src/SomeModule';
import {setConfig, UserInfo} from '../src/utils/utils';
describe('frontend:SomeModule', () => {
const CONFIG = {EXTERNAL_BASE_URL: "http://demo.url"};
const CONFIG = {EXTERNAL_BASE_URL: 'http://demo.url'};
before(() => {
setConfig(CONFIG);
fetchMock.config.overwriteRoutes = true;
@@ -15,14 +15,14 @@ describe('frontend:SomeModule', () => {
it('should return username', async () => {
const tests: [Partial<UserInfo>, string][] = [
[
{name: "John Doe"},
"John Doe",
{name: 'John Doe'},
'John Doe',
], [
{name: "John Doe", email: "some.mail@example.com"},
"John Doe",
{name: 'John Doe', email: 'some.mail@example.com'},
'John Doe',
], [
{name: "", email: "some.mail@example.com"},
"",
{name: '', email: 'some.mail@example.com'},
'',
],
];
for (const [USER_INFO, RESULT] of tests) {
@@ -35,13 +35,13 @@ describe('frontend:SomeModule', () => {
}
});
it('should return default string', async () => {
const RESULT = "No name found!";
const RESULT = 'No name found!';
const tests: (Partial<UserInfo>|unknown)[] = [
// eslint-disable-next-line no-null/no-null
{name: null},
// eslint-disable-next-line no-null/no-null
null,
{email: "some.mail@example.com"},
{email: 'some.mail@example.com'},
{name: undefined},
{},
];