fix(oas:test): Augment jest timeout from 30 to 60 sec (#3631)

* fix(oas:test): fix beforeAll timeout silent failure

* fix(test): fix ts-jest scaffolding in medusa-oas-cli

* chore(changeset): patch
This commit is contained in:
Patrick
2023-03-30 03:17:09 -04:00
committed by GitHub
parent 0e8b3c8efb
commit 377b9ce8c2
4 changed files with 16 additions and 1 deletions

View File

@@ -0,0 +1,5 @@
---
"@medusajs/medusa-oas-cli": patch
---
fix(oas:test): fix beforeAll timeout silent failure

View File

@@ -10,5 +10,5 @@ module.exports = {
},
testEnvironment: `node`,
moduleFileExtensions: [`js`, `ts`],
testTimeout: 30000,
testTimeout: 60000,
}

View File

@@ -82,6 +82,11 @@ describe("command oas", () => {
describe("--type admin", () => {
let oas: OpenAPIObject
/**
* In a CI context, beforeAll might exceed the configured jest timeout.
* Until we upgrade our jest version, the timeout error will be swallowed
* and the test will fail in unexpected ways.
*/
beforeAll(async () => {
const outDir = path.resolve(tmpDir, uid())
await runCLI("oas", ["--type", "admin", "--out-dir", outDir])

View File

@@ -0,0 +1,5 @@
{
"extends": "./tsconfig.json",
"include": ["src"],
"exclude": ["node_modules"]
}