Treat new tests are "no tests"

This commit is contained in:
Adria Navarro 2023-01-17 16:05:02 +00:00
parent 9fc8785900
commit ffc322da88
3 changed files with 32 additions and 0 deletions

View File

@ -1,4 +1,15 @@
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

@ -1,6 +1,17 @@
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()
}

View File

@ -4,7 +4,17 @@ 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" ||