Skip to content

Commit

Permalink
removed isProduction
Browse files Browse the repository at this point in the history
  • Loading branch information
mrkeksz committed Jan 10, 2024
1 parent 272b61b commit 198eda9
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 7 deletions.
3 changes: 0 additions & 3 deletions src/config/environment/environment.config.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,18 @@ describe(EnvironmentConfigService.name, () => {
it('should correctly detect development environment', () => {
process.env['NODE_ENV'] = 'development'
expect(EnvironmentConfigService.isDevelopment).toBe(true)
expect(EnvironmentConfigService.isProduction).toBe(false)
expect(EnvironmentConfigService.isTest).toBe(false)
})

it('should correctly detect production environment', () => {
process.env['NODE_ENV'] = 'production'
expect(EnvironmentConfigService.isDevelopment).toBe(false)
expect(EnvironmentConfigService.isProduction).toBe(true)
expect(EnvironmentConfigService.isTest).toBe(false)
})

it('should correctly detect test environment', () => {
process.env['NODE_ENV'] = 'test'
expect(EnvironmentConfigService.isDevelopment).toBe(false)
expect(EnvironmentConfigService.isProduction).toBe(false)
expect(EnvironmentConfigService.isTest).toBe(true)
})

Expand Down
4 changes: 0 additions & 4 deletions src/config/environment/environment.config.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ export class EnvironmentConfigService {
return process.env['NODE_ENV'] === 'development'
}

public static get isProduction(): boolean {
return process.env['NODE_ENV'] === 'production'
}

public static get isTest(): boolean {
return process.env['NODE_ENV'] === 'test'
}
Expand Down

0 comments on commit 198eda9

Please sign in to comment.