mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-15 00:54:06 -08:00
28 lines
374 B
TypeScript
28 lines
374 B
TypeScript
import { omit } from '../../src/utils/omit';
|
|
|
|
describe('omit', () => {
|
|
test('omit', () => {
|
|
const input = {
|
|
a: true,
|
|
b: true,
|
|
};
|
|
|
|
omit(
|
|
input,
|
|
'b',
|
|
// @ts-expect-error
|
|
'c',
|
|
);
|
|
|
|
const output = omit(input, 'b');
|
|
|
|
// @ts-expect-error
|
|
output.b;
|
|
|
|
expect(output.a).toBe(true);
|
|
|
|
// @ts-expect-error
|
|
expect(output.b).toBeUndefined();
|
|
});
|
|
});
|