Skip to content

Commit

Permalink
test for undefined properties
Browse files Browse the repository at this point in the history
  • Loading branch information
fasttime committed Dec 29, 2023
1 parent 6e2da74 commit b6732ba
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/lib/config/flat-config-schema.js
Expand Up @@ -191,6 +191,14 @@ describe("merge", () => {
confirmLegacyMergeResult(first, second, result);
});

it("sets properties to undefined", () => {
const first = { foo: void 0, bar: void 0 };
const second = { foo: void 0, baz: void 0 };
const result = merge(first, second);

assert.deepStrictEqual(result, { foo: void 0, bar: void 0, baz: void 0 });
});

it("merges objects with self-references", () => {
const first = { foo: 42 };

Expand Down

0 comments on commit b6732ba

Please sign in to comment.