diff --git a/package.json b/package.json index 279926c..e73c3a7 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ "ioredis": "^5.4.1", "jsonwebtoken": "^9.0.2", "jwks-rsa": "^3.1.0", - "node-fetch": "^3.3.2", + "node-fetch": "2", "passport": "^0.5.2", "passport-http": "^0.3.0", "passport-jwt": "^4.0.1", diff --git a/src/admin/admin.controller.spec.ts b/src/admin/admin.controller.spec.ts deleted file mode 100644 index fffe51b..0000000 --- a/src/admin/admin.controller.spec.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { HttpModule, HttpService } from '@nestjs/axios'; -import { Test, TestingModule } from '@nestjs/testing'; -import { AuthModule } from '../auth/auth.module'; -import { AdminController } from './admin.controller'; -import { AdminService } from './admin.service'; -import { FusionauthService } from './fusionauth/fusionauth.service'; -import { QueryGeneratorService } from './query-generator/query-generator.service'; -import { ConfigModule } from '@nestjs/config'; -import { ApiModule } from '../api/api.module'; -import { ConfigResolverService } from '../api/config.resolver.service'; -import { HasuraService } from './hasura/hasura.service'; - -describe('AdminController', () => { - let controller: AdminController; - let fusionauthService: FusionauthService; - let service: AdminService; - let configResolverService: ConfigResolverService; - let httpService: HttpService; - let hasuraService: HasuraService; - - beforeEach(async () => { - const module: TestingModule = await Test.createTestingModule({ - controllers: [AdminController], - imports: [AuthModule, HttpModule, ConfigModule, ApiModule], - providers: [ - FusionauthService, - AdminService, - QueryGeneratorService, - ConfigResolverService, - HasuraService, - ], - }).compile(); - - controller = module.get(AdminController); - fusionauthService = module.get(FusionauthService); - configResolverService = module.get(ConfigResolverService); - httpService = module.get(HttpService); - hasuraService = module.get(HasuraService); - service = module.get(AdminService); - }); - - it('should be defined', () => { - expect(controller).toBeDefined(); - expect(fusionauthService).toBeDefined(); - expect(configResolverService).toBeDefined(); - expect(httpService).toBeDefined(); - expect(hasuraService).toBeDefined(); - expect(service).toBeDefined(); - }); - - it('should be defined', () => { - expect(controller).toBeDefined(); - }); -}); diff --git a/src/admin/admin.service.spec.ts b/src/admin/admin.service.spec.ts deleted file mode 100644 index f1eb8f7..0000000 --- a/src/admin/admin.service.spec.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { HttpModule, HttpService } from '@nestjs/axios'; -import { Test, TestingModule } from '@nestjs/testing'; -import { AuthModule } from '../auth/auth.module'; -import { AdminService } from './admin.service'; -import { FusionauthService } from './fusionauth/fusionauth.service'; -import { QueryGeneratorService } from './query-generator/query-generator.service'; -import { ConfigResolverService } from '../api/config.resolver.service'; -import { ApiModule } from '../api/api.module'; -import { ConfigModule } from '@nestjs/config'; -import { HasuraService } from './hasura/hasura.service'; - -describe('AdminService', () => { - let service: AdminService; - let fusionauthService: FusionauthService; - let configResolverService: ConfigResolverService; - let httpService: HttpService; - let hasuraService: HasuraService; - - beforeEach(async () => { - const module: TestingModule = await Test.createTestingModule({ - imports: [HttpModule, AuthModule, ConfigModule, ApiModule], - providers: [ - FusionauthService, - AdminService, - QueryGeneratorService, - ConfigResolverService, - HasuraService, - ], - }).compile(); - fusionauthService = module.get(FusionauthService); - configResolverService = module.get(ConfigResolverService); - httpService = module.get(HttpService); - hasuraService = module.get(HasuraService); - service = module.get(AdminService); - }); - - it('should be defined', () => { - expect(fusionauthService).toBeDefined(); - expect(configResolverService).toBeDefined(); - expect(httpService).toBeDefined(); - expect(hasuraService).toBeDefined(); - expect(service).toBeDefined(); - }); -}); diff --git a/src/admin/hasura/hasura.service.spec.ts b/src/admin/hasura/hasura.service.spec.ts deleted file mode 100644 index 8700e4e..0000000 --- a/src/admin/hasura/hasura.service.spec.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { Test, TestingModule } from '@nestjs/testing'; -import { HasuraService } from './hasura.service'; -import { UUID } from '@fusionauth/typescript-client'; -import { randomUUID } from 'crypto'; -import { ConfigModule } from '@nestjs/config'; -import { ApiModule } from '../../api/api.module'; -import { ConfigResolverService } from '../../api/config.resolver.service'; -import { HttpModule, HttpService } from '@nestjs/axios'; -import { AuthModule } from '../../auth/auth.module'; -import { FusionauthService } from '../fusionauth/fusionauth.service'; -import { AdminService } from '../admin.service'; -import { QueryGeneratorService } from '../query-generator/query-generator.service'; -import { AdminModule } from '../admin.module'; -import { NotImplementedException } from '@nestjs/common'; - -describe('HasuraService', () => { - let service: HasuraService; - let applicationId: UUID; - let configResolverService: ConfigResolverService; - let httpService: HttpService; - - beforeEach(async () => { - const module: TestingModule = await Test.createTestingModule({ - imports: [HttpModule, ConfigModule, ApiModule, AdminModule], - providers: [ - String, - ConfigResolverService, - HasuraService, - ], - }).compile(); - - configResolverService = module.get(ConfigResolverService); - httpService = module.get(HttpService); - service = module.get(HasuraService); - }); - - it('should be defined', () => { - expect(service).toBeDefined(); - }); -});