2023-06-02 02:22:21 -07:00
|
|
|
import fs from 'fs';
|
|
|
|
import fsPromises from 'fs/promises';
|
|
|
|
import { Readable } from 'stream';
|
2023-09-22 08:22:12 -07:00
|
|
|
import { testWorkflows, getWorkflowFilenames, initBinaryDataService } from '@test/nodes/Helpers';
|
2023-02-09 04:03:53 -08:00
|
|
|
|
|
|
|
const workflows = getWorkflowFilenames(__dirname);
|
|
|
|
|
2023-06-02 02:22:21 -07:00
|
|
|
describe('Test Crypto Node', () => {
|
|
|
|
jest.mock('fast-glob', () => async () => ['/test/binary.data']);
|
|
|
|
jest.mock('fs/promises');
|
|
|
|
fsPromises.access = async () => {};
|
|
|
|
jest.mock('fs');
|
|
|
|
fs.createReadStream = () => Readable.from(Buffer.from('test')) as fs.ReadStream;
|
|
|
|
|
|
|
|
beforeEach(async () => {
|
2023-09-22 08:22:12 -07:00
|
|
|
await initBinaryDataService();
|
2023-06-02 02:22:21 -07:00
|
|
|
});
|
|
|
|
|
|
|
|
testWorkflows(workflows);
|
|
|
|
});
|