Skip to content

Commit 7eefb3b

Browse files
committed
fix: remove hardcoded config test values
1 parent 74814aa commit 7eefb3b

5 files changed

Lines changed: 10 additions & 15 deletions

File tree

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88

99
strategy:
1010
matrix:
11-
node-version: [10.x, 11.x, 12.x, 13.x]
11+
node-version: [10.x, 12.x, 13.x, 14.x]
1212

1313
steps:
1414
- uses: actions/checkout@v1

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nestjs-node-config",
3-
"version": "0.0.4",
3+
"version": "0.0.5",
44
"description": "The nestjs node-config package",
55
"author": "Alex Hermann <alex.hermann@pop-code.com>",
66
"repository": "https://github.com/Pop-Code/nestjs-node-config",
@@ -9,10 +9,10 @@
99
"scripts": {
1010
"build": "rm -Rf ./dist && tsc",
1111
"doc": "rm -Rf ./docs && typedoc ./src && touch ./docs/.nojekyll",
12-
"test": "NODE_CONFIG_DIR=src/test/config jest",
13-
"test:watch": "NODE_CONFIG_DIR=src/test/config jest --watch",
14-
"test:cov": "NODE_CONFIG_DIR=src/test/config jest --coverage",
15-
"test:debug": "NODE_CONFIG_DIR=src/test/config node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest",
12+
"test": "jest",
13+
"test:watch": "jest --watch",
14+
"test:cov": "jest --coverage",
15+
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest",
1616
"lint": "eslint ./src/**/*.ts",
1717
"format": "prettier \"**/*.ts\" --ignore-path ./.prettierignore --write && git status"
1818
},
@@ -57,13 +57,13 @@
5757
"json",
5858
"ts"
5959
],
60-
"rootDir": "src",
60+
"rootDir": ".",
6161
"testRegex": ".spec.ts$",
6262
"transform": {
6363
"^.+\\.(t|j)s$": "ts-jest"
6464
},
6565
"collectCoverageFrom": [
66-
"**/*.{js,jsx,ts}",
66+
"src/**/*.{js,jsx,ts}",
6767
"!index.ts",
6868
"!**/test/**"
6969
],

src/module.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,6 @@ import * as config from 'config';
33

44
import { CONFIG_TOKEN } from './constants';
55

6-
process.env.NODE_CONFIG = JSON.stringify({
7-
test: { foo: "bar", bar: "foo" }
8-
});
9-
10-
116
export const configProvider = {
127
provide: CONFIG_TOKEN,
138
useValue: config
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { INestApplication } from '@nestjs/common';
22
import { Test } from '@nestjs/testing';
33

4-
import { getConfigToken, IConfig, NodeConfigModule } from '../module';
4+
import { getConfigToken, IConfig, NodeConfigModule } from '../src/module';
55

66
let app: INestApplication;
77

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@
1515
"outDir": "dist",
1616
"lib": ["es7", "DOM"]
1717
},
18-
"include": ["src/**/*"]
18+
"include": ["src/**/*", "test"]
1919
}

0 commit comments

Comments
 (0)