ci: Improve test for wait node (#5997)

This commit is contained in:
Jon
2023-04-18 11:28:05 +01:00
committed by GitHub
parent 3c2a56928b
commit 1555387ece
2 changed files with 83 additions and 49 deletions

View File

@@ -1,4 +1,19 @@
import { testWorkflows, getWorkflowFilenames } from '../../../test/nodes/Helpers';
const workflows = getWorkflowFilenames(__dirname);
describe('Execute Wait Node', () => testWorkflows(workflows));
describe('Execute Wait Node', () => {
let timer: NodeJS.Timer;
const { clearInterval, setInterval } = global;
beforeAll(() => {
timer = setInterval(() => jest.advanceTimersByTime(1000), 10);
jest.useFakeTimers();
});
afterAll(() => {
clearInterval(timer);
jest.useRealTimers();
});
testWorkflows(workflows);
});