chore: updated .env.example file with new data

This commit is contained in:
Balu Babu
2023-01-20 15:00:54 +05:30
parent f79070fe60
commit ee3fbabece
2 changed files with 38 additions and 14 deletions

View File

@@ -1,18 +1,35 @@
import { Test, TestingModule } from '@nestjs/testing';
import { JwtService } from '@nestjs/jwt';
import { mockDeep } from 'jest-mock-extended';
import { MailerService } from 'src/mailer/mailer.service';
import { PrismaService } from 'src/prisma/prisma.service';
import { AuthUser } from 'src/types/AuthUser';
import { UserService } from 'src/user/user.service';
import { AuthService } from './auth.service';
describe('AuthService', () => {
let service: AuthService;
const mockPrisma = mockDeep<PrismaService>();
const mockUser = mockDeep<UserService>();
const mockJWT = mockDeep<JwtService>();
const mockMailer = mockDeep<MailerService>();
beforeEach(async () => {
const module: TestingModule = await Test.createTestingModule({
providers: [AuthService],
}).compile();
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
const authService = new AuthService(mockUser, mockPrisma, mockJWT, mockMailer);
service = module.get<AuthService>(AuthService);
});
const currentTime = new Date();
it('should be defined', () => {
expect(service).toBeDefined();
});
const user: AuthUser = {
uid: '123344',
email: 'dwight@dundermifflin.com',
displayName: 'Dwight Schrute',
photoURL: 'https://en.wikipedia.org/wiki/Dwight_Schrute',
isAdmin: false,
refreshToken: 'hbfvdkhjbvkdvdfjvbnkhjb',
createdOn: currentTime,
};
describe('signIn', () => {
// should throw error if email is not in valid format
// should successfully create a new user account and return the passwordless details
// should successfully return the passwordless details for a existing user account
});