diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9fcde2a..236e183 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -24,5 +24,8 @@ jobs: - name: Install Dependencies run: npm ci + - name: Set Environment Variables + run: echo "NODE_ENV=test" >> $GITHUB_ENV + - name: Run Tests run: npm test diff --git a/src/tests/services/testService.spec.ts b/src/tests/services/testService.spec.ts index 9bc1b87..2555073 100644 --- a/src/tests/services/testService.spec.ts +++ b/src/tests/services/testService.spec.ts @@ -1,5 +1,5 @@ import { setupTestDB, teardownTestDB } from "../../utils/test-utils"; -import { testDataSource } from "../../config/ormconfig.test"; +import testDataSource from "../../config/ormconfig.test"; import { TestService } from "../../services/test.service"; import { TestEntity } from "../../entities/testEntity"; diff --git a/src/tests/services/userService.spec.ts b/src/tests/services/userService.spec.ts index 7e90ddc..794169c 100644 --- a/src/tests/services/userService.spec.ts +++ b/src/tests/services/userService.spec.ts @@ -1,5 +1,5 @@ import { setupTestDB, teardownTestDB } from "../../utils/test-utils"; -import { testDataSource } from "../../config/ormconfig.test"; +import testDataSource from "../../config/ormconfig.test"; import { UserService } from "../../services/User.service"; import { User } from "../../entities/User";