Installation du module Nest Prisma

This commit is contained in:
Emmy D'Anello 2024-12-07 10:26:15 +01:00
parent 2ad2063339
commit 15e0263559
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85
3 changed files with 24 additions and 1 deletions

View File

@ -1,10 +1,11 @@
import { Module } from '@nestjs/common'
import { AppController } from './app.controller'
import { AppService } from './app.service'
import { PrismaService } from './prisma/prisma.service'
@Module({
imports: [],
controllers: [AppController],
providers: [AppService],
providers: [AppService, PrismaService],
})
export class AppModule {}

View File

@ -0,0 +1,18 @@
import { Test, TestingModule } from '@nestjs/testing'
import { PrismaService } from './prisma.service'
describe('PrismaService', () => {
let service: PrismaService
beforeEach(async () => {
const module: TestingModule = await Test.createTestingModule({
providers: [PrismaService],
}).compile()
service = module.get<PrismaService>(PrismaService)
})
it('should be defined', () => {
expect(service).toBeDefined()
})
})

View File

@ -0,0 +1,4 @@
import { Injectable } from '@nestjs/common'
@Injectable()
export class PrismaService {}