Skip to content

Commit

Permalink
Fix lint and test issues
Browse files Browse the repository at this point in the history
  • Loading branch information
abarghoud committed Oct 30, 2024
1 parent 3bcfdc3 commit a19ca00
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
7 changes: 6 additions & 1 deletion apps/api/src/app/generate.controller.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import { mock } from 'jest-mock-extended';
import { GenerateController } from './generate.controller';
import { PPSProfileDto } from './pps/domain/pps-profile-dto.model';
import { IPPSGenerateUseCase, IPPSGenerateUseCaseSymbol } from './pps/usecase/pps-generate-usecase.interface';
import { IRecaptchaCheckerSymbol } from '@pps-easy/recaptcha/contracts';
import { LocalRecaptchaChecker } from '@pps-easy/recaptcha/google';

describe('The GenerateController class', () => {
let app: TestingModule;
Expand All @@ -12,7 +14,10 @@ describe('The GenerateController class', () => {
beforeAll(async () => {
app = await Test.createTestingModule({
controllers: [GenerateController],
providers: [{ provide: IPPSGenerateUseCaseSymbol, useValue: ppsGeneratorUseCase }],
providers: [
{ provide: IPPSGenerateUseCaseSymbol, useValue: ppsGeneratorUseCase },
{ provide: IRecaptchaCheckerSymbol, useClass: LocalRecaptchaChecker },
],
}).compile();
});

Expand Down
1 change: 1 addition & 0 deletions libs/recaptcha/contracts/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export default defineConfig({
// plugins: [ nxViteTsPaths() ],
// },
test: {
passWithNoTests: true,
watch: false,
globals: true,
environment: 'node',
Expand Down
1 change: 1 addition & 0 deletions libs/recaptcha/google/src/lib/local-recaptcha-checker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
} from '@pps-easy/recaptcha/contracts';

export class LocalRecaptchaChecker implements IRecaptchaChecker {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
public check(token: string): Promise<ChallengeResultData> {
return Promise.resolve({ score: 1, isValid: true, reasons: [] });
}
Expand Down
1 change: 1 addition & 0 deletions libs/recaptcha/google/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export default defineConfig({
// plugins: [ nxViteTsPaths() ],
// },
test: {
passWithNoTests: true,
watch: false,
globals: true,
environment: 'node',
Expand Down

0 comments on commit a19ca00

Please sign in to comment.