Skip to content

Commit de720b3

Browse files
fix: resolve lint errors in test files
- Fix max-len in fixtures.ts (break long import) - Add eslint-env node to jest.e2e.config.js - Remove unused vars in e2e tests Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 29de42a commit de720b3

5 files changed

Lines changed: 12 additions & 7 deletions

File tree

jest.e2e.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-env node */
12
module.exports = {
23
transform: { '^.+\\.ts?$': 'ts-jest' },
34
testEnvironment: 'node',

src/__e2e__/authenticator.e2e.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ describe('FronteggAuthenticator E2E', () => {
2626

2727
it('should refresh authentication', async () => {
2828
await authenticator.init(E2E_CLIENT_ID, E2E_API_KEY);
29-
const firstToken = authenticator.accessToken;
30-
3129
await authenticator.refreshAuthentication();
3230

3331
expect(authenticator.accessToken).toBeTruthy();

src/__e2e__/identity-client.e2e.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
import { FronteggAuthenticator } from '../authenticator';
2-
import { HttpClient } from '../clients/http/http-client';
3-
import { FronteggContext } from '../components/frontegg-context';
42
import { config } from '../config';
53
import { E2E_CLIENT_ID, E2E_API_KEY, requireApiKey } from './setup';
64
import axios from 'axios';

src/__e2e__/middleware.e2e.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import * as express from 'express';
22
import * as http from 'http';
3-
import { FronteggAuthenticator } from '../authenticator';
43
import { FronteggContext } from '../components/frontegg-context';
54
import { withAuthentication } from '../middlewares/with-authentication';
65
import { E2E_CLIENT_ID, E2E_API_KEY, requireApiKey } from './setup';
@@ -20,7 +19,8 @@ describe('withAuthentication middleware E2E', () => {
2019
app.get('/protected', withAuthentication(), (req, res) => {
2120
res.json({ user: (req as any).frontegg?.user });
2221
});
23-
app.use((err: any, req: any, res: any, next: any) => {
22+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
23+
app.use((err: any, _req: any, res: any, _next: any) => {
2424
res.status(err.statusCode || 500).json({ error: err.message });
2525
});
2626

src/__test-utils__/fixtures.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
1-
import { IUser, IUserApiToken, ITenantApiToken, IUserAccessToken, ITenantAccessToken, IEntityWithRoles, tokenTypes } from '../clients/identity/types';
1+
import {
2+
IUser,
3+
IUserApiToken,
4+
ITenantApiToken,
5+
IUserAccessToken,
6+
ITenantAccessToken,
7+
IEntityWithRoles,
8+
tokenTypes,
9+
} from '../clients/identity/types';
210

311
export const fakeUser: IUser = {
412
sub: 'fake-sub',

0 commit comments

Comments
 (0)