n8n/packages/@n8n/json-schema-to-zod/test/utils/half.test.ts

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
294 B
TypeScript
Raw Normal View History

import { half } from '../../src/utils/half';
describe('half', () => {
test('half', () => {
const [a, b] = half(['A', 'B', 'C', 'D', 'E']);
if (1 < 0) {
// type should be string
a[0].endsWith('');
}
expect(a).toEqual(['A', 'B']);
expect(b).toEqual(['C', 'D', 'E']);
});
});