eslint - rules updated
This commit is contained in:
@@ -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},
|
||||
{},
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user