@burninggarden/config
Advanced tools
Comparing version 0.0.3 to 0.0.4
{ | ||
"name": "@burninggarden/config", | ||
"description": "A library for sharing config values across modules", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"private": false, | ||
@@ -6,0 +6,0 @@ "author": "Burning Garden", |
@@ -27,2 +27,6 @@ import {EnvironmentType} from '@burninggarden/enums'; | ||
public static getManagerPort(): number { | ||
return this.getInstance().getManagerPort(); | ||
} | ||
public isDevelopment(): boolean { | ||
@@ -40,2 +44,6 @@ return this.getEnvironmentType() === EnvironmentType.DEVELOPMENT; | ||
public getManagerPort(): number { | ||
return 3000; | ||
} | ||
private getEnvironmentType(): EnvironmentType { | ||
@@ -42,0 +50,0 @@ switch (process.env.NODE_ENV) { |
@@ -54,1 +54,8 @@ import Tap from 'tap'; | ||
}); | ||
Tap.test('.getManagerPort() returns expected port value', test => { | ||
const port = (new Config()).getManagerPort(); | ||
test.equals(port, 3000); | ||
test.end(); | ||
}); |
12542
216