mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-16 09:34:07 -08:00
16 lines
294 B
TypeScript
16 lines
294 B
TypeScript
|
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']);
|
||
|
});
|
||
|
});
|