ts-prime
Version:
A utility library for JavaScript and Typescript.
21 lines (20 loc) • 505 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
var compact_1 = require("./compact");
test("Compact test", function () {
expect(compact_1.compact({
a: undefined,
b: null
})).toEqual({});
});
test("Compact test", function () {
expect(compact_1.compact({
a: undefined,
b: [undefined],
x: {
zx: [{
a: undefined
}]
}
})).toEqual({ "b": [], "x": { "zx": [{}] } });
});