Set default packages/server test timeout to 30 seconds, and unmock console.log.
This commit is contained in:
parent
204b16876a
commit
4183a0aeb7
|
@ -1,7 +1,5 @@
|
|||
const setup = require("../../tests/utilities")
|
||||
|
||||
jest.setTimeout(30000)
|
||||
|
||||
describe("/metrics", () => {
|
||||
let request = setup.getRequest()
|
||||
let config = setup.getConfig()
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import * as setup from "./utilities"
|
||||
import path from "path"
|
||||
|
||||
jest.setTimeout(15000)
|
||||
const PASSWORD = "testtest"
|
||||
|
||||
describe("/applications/:appId/import", () => {
|
||||
|
|
|
@ -23,8 +23,6 @@ let {
|
|||
collectAutomation,
|
||||
} = setup.structures
|
||||
|
||||
jest.setTimeout(30000)
|
||||
|
||||
describe("/automations", () => {
|
||||
let request = setup.getRequest()
|
||||
let config = setup.getConfig()
|
||||
|
|
|
@ -3,8 +3,6 @@ import { checkPermissionsEndpoint } from "./utilities/TestFunctions"
|
|||
import * as setup from "./utilities"
|
||||
import { UserMetadata } from "@budibase/types"
|
||||
|
||||
jest.setTimeout(30000)
|
||||
|
||||
jest.mock("../../../utilities/workerRequests", () => ({
|
||||
getGlobalUsers: jest.fn(() => {
|
||||
return {}
|
||||
|
|
|
@ -25,8 +25,6 @@ const clearMigrations = async () => {
|
|||
}
|
||||
}
|
||||
|
||||
jest.setTimeout(10000)
|
||||
|
||||
describe("migrations", () => {
|
||||
const config = new TestConfig()
|
||||
|
||||
|
|
|
@ -17,8 +17,6 @@ import {
|
|||
generator,
|
||||
} from "@budibase/backend-core/tests"
|
||||
|
||||
jest.setTimeout(30000)
|
||||
|
||||
describe("external search", () => {
|
||||
const config = new TestConfiguration()
|
||||
|
||||
|
|
|
@ -2,17 +2,11 @@ import env from "../environment"
|
|||
import { env as coreEnv, timers } from "@budibase/backend-core"
|
||||
import { testContainerUtils } from "@budibase/backend-core/tests"
|
||||
|
||||
if (!process.env.DEBUG) {
|
||||
global.console.log = jest.fn() // console.log are ignored in tests
|
||||
global.console.warn = jest.fn() // console.warn are ignored in tests
|
||||
}
|
||||
|
||||
if (!process.env.CI) {
|
||||
// set a longer timeout in dev for debugging
|
||||
// 100 seconds
|
||||
// set a longer timeout in dev for debugging 100 seconds
|
||||
jest.setTimeout(100 * 1000)
|
||||
} else {
|
||||
jest.setTimeout(10 * 1000)
|
||||
jest.setTimeout(30 * 1000)
|
||||
}
|
||||
|
||||
testContainerUtils.setupEnv(env, coreEnv)
|
||||
|
|
Loading…
Reference in New Issue