feat(Crypto Node): Add support for hash and hmac on binary data (#6359)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2023-06-02 09:22:21 +00:00
committed by GitHub
parent 9dfc11037b
commit 406a405dd1
3 changed files with 168 additions and 57 deletions

View File

@@ -1,5 +1,24 @@
import { testWorkflows, getWorkflowFilenames } from '../../../test/nodes/Helpers';
import fs from 'fs';
import fsPromises from 'fs/promises';
import { Readable } from 'stream';
import {
testWorkflows,
getWorkflowFilenames,
initBinaryDataManager,
} from '../../../test/nodes/Helpers';
const workflows = getWorkflowFilenames(__dirname);
describe('Test Crypto Node', () => testWorkflows(workflows));
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);
});