Treat new tests are "no tests"
This commit is contained in:
parent
3042910aca
commit
39b33aaf5c
|
@ -1,4 +1,15 @@
|
||||||
|
function isDockerisedTest() {
|
||||||
|
return process.env.DOCKERISED_TEST === "true"
|
||||||
|
}
|
||||||
|
|
||||||
function isTest() {
|
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()
|
return isCypress() || isJest()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,17 @@
|
||||||
import { join } from "path"
|
import { join } from "path"
|
||||||
|
|
||||||
|
function isDockerisedTest() {
|
||||||
|
return process.env.DOCKERISED_TEST === "true"
|
||||||
|
}
|
||||||
|
|
||||||
function isTest() {
|
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()
|
return isCypress() || isJest()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,17 @@ function isDev() {
|
||||||
return process.env.NODE_ENV !== "production"
|
return process.env.NODE_ENV !== "production"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function isDockerisedTest() {
|
||||||
|
return process.env.DOCKERISED_TEST === "true"
|
||||||
|
}
|
||||||
|
|
||||||
function isTest() {
|
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 (
|
return (
|
||||||
process.env.NODE_ENV === "jest" ||
|
process.env.NODE_ENV === "jest" ||
|
||||||
process.env.NODE_ENV === "cypress" ||
|
process.env.NODE_ENV === "cypress" ||
|
||||||
|
|
Loading…
Reference in New Issue