Skip to content

Commit

Permalink
Refactor/disable timeout for all runtime tests while debugging (#33)
Browse files Browse the repository at this point in the history
* refactor: disable timeout for all runtime tests while debugging

* refactor: create own jestSettings file

* refactor: rename jestSettings -> disableTimeoutForDebugging
  • Loading branch information
Magnus-Kuhn committed Feb 22, 2024
1 parent d346fb1 commit 3c95c94
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 10 deletions.
1 change: 1 addition & 0 deletions packages/runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"preset": "ts-jest",
"setupFilesAfterEnv": [
"./test/customMatchers.ts",
"./test/disableTimeoutForDebugging.ts",
"jest-expect-message"
],
"testEnvironment": "node",
Expand Down
5 changes: 0 additions & 5 deletions packages/runtime/test/consumption/attributes-e2e.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,6 @@ import {
waitForRecipientToReceiveNotification
} from "../lib";

/* Disable timeout errors if we're debugging */
if (process.env.NODE_OPTIONS !== undefined && process.env.NODE_OPTIONS.search("inspect") !== -1) {
jest.setTimeout(1e9);
}

const runtimeServiceProvider = new RuntimeServiceProvider();

let services1: TestRuntimeServices;
Expand Down
5 changes: 0 additions & 5 deletions packages/runtime/test/consumption/iqlQuery.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@ import { ConsumptionServices, LocalAttributeDTO, LocalRequestDTO, MessageDTO, Ou
import { IncomingRequestReceivedEvent, IncomingRequestStatusChangedEvent } from "../../src/events";
import { establishRelationship, RuntimeServiceProvider, syncUntilHasMessageWithRequest, syncUntilHasMessageWithResponse } from "../lib";

/* Disable timeout errors if we're debugging */
if (process.env.NODE_OPTIONS !== undefined && process.env.NODE_OPTIONS.search("inspect") !== -1) {
jest.setTimeout(1e9);
}

describe("IQL Query", () => {
const runtimeServiceProvider = new RuntimeServiceProvider();
let sConsumptionServices: ConsumptionServices;
Expand Down
4 changes: 4 additions & 0 deletions packages/runtime/test/disableTimeoutForDebugging.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/* Disable timeout errors if we're debugging */
if (process.env.NODE_OPTIONS !== undefined && process.env.NODE_OPTIONS.search("inspect") !== -1) {
jest.setTimeout(1e9);
}

0 comments on commit 3c95c94

Please sign in to comment.