chore: enable no-unused vars (#2181)

This commit is contained in:
Himself65
2023-04-28 00:41:06 -05:00
committed by GitHub
parent b6ca2aa063
commit 70fbbb39c1
70 changed files with 206 additions and 225 deletions

View File

@@ -5,7 +5,7 @@ import { UnauthorizedException } from '@nestjs/common';
import { Test } from '@nestjs/testing';
import { PrismaClient } from '@prisma/client';
import { Config, ConfigModule } from '../config';
import { ConfigModule } from '../config';
import { getDefaultAFFiNEConfig } from '../config/default';
import { GqlModule } from '../graphql.module';
import { AuthModule } from '../modules/auth';
@@ -15,7 +15,6 @@ import { PrismaModule } from '../prisma';
globalThis.AFFiNE = getDefaultAFFiNEConfig();
let auth: AuthService;
let config: Config;
// cleanup database before each test
beforeEach(async () => {
@@ -38,7 +37,6 @@ beforeEach(async () => {
AuthModule,
],
}).compile();
config = module.get(Config);
auth = module.get(AuthService);
});

View File

@@ -16,12 +16,12 @@ beforeEach(async () => {
config = module.get(Config);
});
test('should be able to get config', t => {
test('should be able to get config', () => {
ok(typeof config.host === 'string');
equal(config.env, 'test');
});
test('should be able to override config', async t => {
test('should be able to override config', async () => {
const module = await Test.createTestingModule({
imports: [
ConfigModule.forRoot({