Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from
Mar 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/poor-bulldogs-repeat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@medusajs/medusa-oas-cli": patch
---

fix(oas:test): fix beforeAll timeout silent failure
2 changes: 1 addition & 1 deletion packages/oas/medusa-oas-cli/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ module.exports = {
},
testEnvironment: `node`,
moduleFileExtensions: [`js`, `ts`],
testTimeout: 30000,
testTimeout: 60000,
}
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down
5 changes: 5 additions & 0 deletions packages/oas/medusa-oas-cli/tsconfig.spec.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"extends": "./tsconfig.json",
"include": ["src"],
"exclude": ["node_modules"]
}