1
0
Fork 0
mirror of synced 2024-08-15 01:51:33 +12:00

Remove isDockerisedTest

This commit is contained in:
adrinr 2023-02-02 10:50:20 +00:00
parent 3328c908ff
commit a80fc4aaa8
5 changed files with 1 additions and 42 deletions

View file

@ -1,15 +1,4 @@
function isDockerisedTest() {
return process.env.DOCKERISED_TEST === "true"
}
function isTest() {
if (isDockerisedTest()) {
// While we are migrating all the tests to use docker instead of mocked in memory,
// we want to keep treating the old tests as tests,
// but the new tests should not make a difference
return false
}
return isCypress() || isJest()
}

View file

@ -74,7 +74,7 @@ server.on("close", async () => {
await events.shutdown()
await Thread.shutdown()
api.shutdown()
if (!env.isTest() && !env.isDockerisedTest()) {
if (!env.isTest()) {
process.exit(errCode)
}
})

View file

@ -1,17 +1,6 @@
import { join } from "path"
function isDockerisedTest() {
return process.env.DOCKERISED_TEST === "true"
}
function isTest() {
if (isDockerisedTest()) {
// While we are migrating all the tests to use docker instead of mocked in memory,
// we want to keep treating the old tests as tests,
// but the new tests should not make a difference
return false
}
return isCypress() || isJest()
}
@ -115,7 +104,6 @@ const environment = {
isInThread: () => {
return inThread
},
isDockerisedTest,
}
// threading can cause memory issues with node-ts in development

View file

@ -168,14 +168,6 @@ class TestConfiguration {
}
if (this.allApps) {
cleanup(this.allApps.map(app => app.appId))
if (env.isDockerisedTest()) {
await this._req(
null,
{ appId: this.prodApp.appId },
controllers.app.destroy
)
}
}
if (this.server) {

View file

@ -4,17 +4,7 @@ function isDev() {
return process.env.NODE_ENV !== "production"
}
function isDockerisedTest() {
return process.env.DOCKERISED_TEST === "true"
}
function isTest() {
if (isDockerisedTest()) {
// While we are migrating all the tests to use docker instead of mocked in memory,
// we want to keep treating the old tests as tests,
// but the new tests should not make a difference
return false
}
return (
process.env.NODE_ENV === "jest" ||
process.env.NODE_ENV === "cypress" ||