2023-06-02 02:22:21 -07:00
|
|
|
import fs from 'fs';
|
|
|
|
import fsPromises from 'fs/promises';
|
|
|
|
import { Readable } from 'stream';
|
|
|
|
import {
|
|
|
|
testWorkflows,
|
|
|
|
getWorkflowFilenames,
|
|
|
|
initBinaryDataManager,
|
|
|
|
} 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 () => {
|
|
|
|
await initBinaryDataManager();
|
|
|
|
});
|
|
|
|
|
|
|
|
testWorkflows(workflows);
|
|
|
|
});
|