1
0
mirror of https://github.com/SomboChea/ui synced 2026-01-19 01:25:51 +07:00

chore: migrate eslint@6.6.0 (#227)

* chore: migrate to eslint6

* chore: migrate to eslint6
This commit is contained in:
Juan Picado @jotadeveloper
2019-10-27 15:49:30 +01:00
committed by GitHub
parent 2a2784ba39
commit e6b53c0479
31 changed files with 409 additions and 196 deletions

View File

@@ -40,7 +40,11 @@ describe('isTokenExpire', (): void => {
test('isTokenExpire - token is not a valid json token', (): void => {
const token = generateInvalidToken();
const result = ['Invalid token:', new SyntaxError('Unexpected token i in JSON at position 0'), 'xxxxxx.aW52YWxpZHRva2Vu.xxxxxx'];
const result = [
'Invalid token:',
new SyntaxError('Unexpected token i in JSON at position 0'),
'xxxxxx.aW52YWxpZHRva2Vu.xxxxxx',
];
expect(isTokenExpire(token)).toBeTruthy();
expect(console.error).toHaveBeenCalledWith(...result);
});
@@ -66,7 +70,7 @@ describe('makeLogin', (): void => {
test('makeLogin - should login successfully', async (): Promise<void> => {
const { username, password } = { username: 'sam', password: '1234' };
const result = { token: 'TEST_TOKEN', username: 'sam' };
const result = { token: 'TEST_TOKEN', username: 'sam' }; // pragma: allowlist secret
const login = await makeLogin(username, password);
expect(login).toEqual(result);
});