forked from wangziqi/gongxue-base
chore: apply eslint --fix autofixes (remove unnecessary as never casts in tests)
This commit is contained in:
@@ -167,7 +167,7 @@ describe('DatabaseMigrationsService — bootstrap failure handling', () => {
|
||||
{ provide: getDataSourceToken(), useValue: dataSource },
|
||||
],
|
||||
}).compile();
|
||||
const service = module.get(DatabaseMigrationsService) as DatabaseMigrationsService & MigrationsPrivate;
|
||||
const service = module.get(DatabaseMigrationsService);
|
||||
|
||||
jest.spyOn(service, 'ensureAiConfigTable').mockRejectedValue(new Error('migration failed'));
|
||||
const backfill = jest.spyOn(service, 'backfillOrganizations').mockResolvedValue();
|
||||
@@ -228,7 +228,7 @@ describe('DatabaseMigrationsService — protectAttendanceHistory', () => {
|
||||
{ provide: getDataSourceToken(), useValue: dataSource },
|
||||
],
|
||||
}).compile();
|
||||
service = module.get(DatabaseMigrationsService) as DatabaseMigrationsService & MigrationsPrivate;
|
||||
service = module.get(DatabaseMigrationsService);
|
||||
}
|
||||
|
||||
it('skips when attendance_sessions table is absent', async () => {
|
||||
@@ -424,5 +424,5 @@ async function bootstrapCourseAttendance(runner: ReturnType<typeof mockRunner>)
|
||||
{ provide: getDataSourceToken(), useValue: dataSource },
|
||||
],
|
||||
}).compile();
|
||||
service = module.get(DatabaseMigrationsService) as DatabaseMigrationsService & MigrationsPrivate;
|
||||
service = module.get(DatabaseMigrationsService);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user