Files
Sergei Zharinov 930cf6633c refactor: Rewrite imports with .ts extensions (#40700)
fix: Additional vi.mock path corrections and prettier formatting
2026-01-26 22:48:17 +00:00

22 lines
540 B
TypeScript

import { isNotNullOrUndefined, toArray } from './array.ts';
describe('util/array', () => {
it.each`
a | exp
${null} | ${false}
${undefined} | ${false}
${{ name: 'foo' }} | ${true}
`('.isNotNullOrUndefined', ({ a, exp }) => {
expect(isNotNullOrUndefined(a)).toEqual(exp);
});
it.each`
a | exp
${null} | ${[null]}
${undefined} | ${[undefined]}
${[]} | ${[]}
`('.toArray', ({ a, exp }) => {
expect(toArray(a)).toEqual(exp);
});
});