backport
Version:
A CLI tool that automates the process of backporting commits
25 lines • 814 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const excludeUndefined_1 = require("./excludeUndefined");
describe('excludeUndefined', () => {
it('removes undefined values', () => {
expect((0, excludeUndefined_1.excludeUndefined)({
foo: 'foo',
bar: undefined,
baz: null,
})).toEqual({ foo: 'foo', baz: null });
});
it('has the correct types after merging', () => {
const obj = (0, excludeUndefined_1.excludeUndefined)({
foo: 'foo',
bar: undefined,
baz: null,
});
const res = {
bar: 'bar',
...obj,
};
expect(res).toEqual({ bar: 'bar', foo: 'foo', baz: null });
});
});
//# sourceMappingURL=excludeUndefined.test.js.map