chore: Merge master to develop (#3653)

This commit is contained in:
Oliver Windall Juhl
2023-03-31 13:09:57 +02:00
committed by GitHub
parent b2e2eddcea
commit 809ab2e0eb
120 changed files with 2240 additions and 585 deletions
@@ -0,0 +1,59 @@
import { omitDeep } from "../omit-deep"
describe("omitDeep", () => {
it("should omit properties in a nested object", () => {
const input = {
id: 1,
__typename: "123",
createdAt: "1020209",
address: {
id: 1,
__typename: "123",
},
variants: [
20,
{
id: 22,
title: "hello world",
__typename: "123",
createdAt: "1020209",
variantOption: {
id: 1,
__typename: "123",
},
},
{
id: 32,
test: null,
__typename: "123",
createdAt: "1020209",
},
],
}
const output = {
id: 1,
address: {
id: 1,
},
variants: [
20,
{
id: 22,
title: "hello world",
variantOption: {
id: 1,
},
},
{
id: 32,
test: null,
},
],
}
expect(
omitDeep(input, ["createdAt", "updatedAt", "__typename"])
).toEqual(output)
})
})