mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00: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();
|
|
});
|
|
});
|