service.ts
@Injectable()
export class FileUploadService {
private readonly logger = new Logger(FileUploadService.name);
constructor(private readonly httpService: HttpService) {}
}
spec.ts
beforeEach(async () => {
const app: TestingModule = await Test.createTestingModule({
imports: [],
providers: [FileUploadService],
}).compile();
fileService = app.get<FileUploadService>(FileUploadService);
});
error Test Error
Who can help me? I tried all of stackoverflow and still couldn't solve it.
It help me to run test successfully.
But I don't know if it's right???