| 1234567891011121314151617181920212223242526 |
- import { Test, TestingModule } from '@nestjs/testing'
- import { BcryptService } from './bcrypt.service'
- describe('BcryptService', () => {
- let service: BcryptService
- beforeEach(async () => {
- const module: TestingModule = await Test.createTestingModule({
- providers: [
- {
- provide: BcryptService,
- useValue: {
- hash: jest.fn(() => 'pass123'),
- compare: jest.fn(() => true)
- }
- }
- ]
- }).compile()
- service = module.get<BcryptService>(BcryptService)
- })
- it('should be defined', () => {
- expect(service).toBeDefined()
- })
- })
|