ts-prime
Version:
A utility library for JavaScript and Typescript.
17 lines (14 loc) • 433 B
text/typescript
import { omit } from './omit';
import { pipe } from './pipe';
describe('data first', () => {
test('omit', () => {
const result = omit({ a: 1, b: 2, c: 3, d: 4 }, ['a', 'd'] as const);
expect(result).toEqual({ b: 2, c: 3 });
});
});
describe('data last', () => {
test('omit', () => {
const result = pipe({ a: 1, b: 2, c: 3, d: 4 }, omit(['a', 'd'] as const));
expect(result).toEqual({ b: 2, c: 3 });
});
});