Security: Sync from Public / sync-from-public (push) Has been cancelled
Test: Benchmark Nightly / build (push) Has been cancelled
Test: Benchmark Nightly / Notify Cats on failure (push) Has been cancelled
CI: Python / Checks (push) Has been cancelled
Test: Evals Python / Workflow Comparison Python (push) Has been cancelled
Util: Check Docs URLs / check-docs-urls (push) Has been cancelled
Test: Visual Storybook / Cloudflare Pages (push) Has been cancelled
Test: E2E Performance / build-and-test-performance (push) Has been cancelled
Test: Workflows Nightly / Run Workflow Tests (push) Has been cancelled
Util: Cleanup CI Docker Images / Delete stale CI images (push) Has been cancelled
Test: Benchmark Destroy Env / build (push) Has been cancelled
Util: Update Node Popularity / update-popularity (push) Has been cancelled
Test: E2E Coverage Weekly / Coverage Tests (push) Has been cancelled
34 lines
639 B
TypeScript
34 lines
639 B
TypeScript
import type { INodeExecutionData } from 'n8n-workflow';
|
|
|
|
import { checkInput } from '../../GenericFunctions';
|
|
|
|
describe('Test Compare Datasets Node utils', () => {
|
|
it('test checkInput', () => {
|
|
const input1 = [
|
|
{ json: {} },
|
|
{
|
|
json: {
|
|
name: 'Test',
|
|
age: 30,
|
|
},
|
|
},
|
|
{
|
|
json: {
|
|
name: 'Test2',
|
|
age: 30,
|
|
},
|
|
},
|
|
];
|
|
|
|
expect(checkInput(input1).length).toEqual(2);
|
|
|
|
const input2: INodeExecutionData[] = [{ json: {} }];
|
|
|
|
expect(checkInput(input2).length).toEqual(0);
|
|
|
|
const input3 = undefined;
|
|
|
|
expect(checkInput(input3 as unknown as INodeExecutionData[]).length).toEqual(0);
|
|
});
|
|
});
|