Remove isDockerisedTest
This commit is contained in:
parent
3328c908ff
commit
a80fc4aaa8
|
@ -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()
|
||||
}
|
||||
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
})
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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" ||
|
||||
|
|
Loading…
Reference in New Issue