Skip to content

Instantly share code, notes, and snippets.

View Toilal's full-sized avatar

Rémi Alvergnat Toilal

View GitHub Profile
import { Module } from '@nestjs/common'
import { ConfigModule } from '@nestjs/config'
import { CleanEnvironmentModule } from './clean-environment.module'
const envFilePath = process.env.NODE_ENV === 'test' ? '.env.test' : undefined
@Module({
imports: [
CleanEnvironmentModule.forPredicate(envFilePath, () => process.env.NODE_ENV === 'test'),
ConfigModule.forRoot({