Skip to content

Commit e9332c9

Browse files
committed
test: add useRealTimers for flaky test
Signed-off-by: Youngone Lee <[email protected]>
1 parent de94f93 commit e9332c9

File tree

1 file changed

+2
-15
lines changed

1 file changed

+2
-15
lines changed

packages/cactus-test-cmd-api-server/src/test/typescript/integration/runtime-plugin-imports.test.ts

+2-15
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ const testCase = "can import plugins at runtime (CLI)";
1818
describe(testCase, () => {
1919
let apiServer: ApiServer;
2020

21-
beforeAll(() => {
22-
jest.resetModules();
21+
afterEach(() => {
22+
jest.useRealTimers();
2323
});
2424

2525
test(testCase, async () => {
@@ -75,18 +75,5 @@ describe(testCase, () => {
7575
});
7676
afterAll(async () => {
7777
await apiServer.shutdown();
78-
// nodeCleanup(test, (exitCode: unknown) => {
79-
// if (exitCode == 0) {
80-
// console.log("gets into the first if statement");
81-
// afterAll(async () => {
82-
// await apiServer.shutdown();
83-
// });
84-
// } else {
85-
// console.log("gets into the second if statement");
86-
// afterAll(async () => {
87-
// await apiServer.shutdown();
88-
// });
89-
// }
90-
// });
9178
});
9279
});

0 commit comments

Comments
 (0)