n8n/packages/nodes-base/nodes/Wait/test/Wait.node.test.ts

20 lines
457 B
TypeScript
Raw Normal View History

import { testWorkflows, getWorkflowFilenames } from '@test/nodes/Helpers';
const workflows = getWorkflowFilenames(__dirname);
2023-04-18 03:28:05 -07:00
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);
});