From 613efc58b1152b91ca852a598e53704bcb0d0bd2 Mon Sep 17 00:00:00 2001 From: Francisco Moretti Date: Wed, 1 Jan 2025 09:19:30 +0000 Subject: [PATCH] fix test --- .../notion-downloader/test/properties/toPlainText.test.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/notion-downloader/test/properties/toPlainText.test.ts b/packages/notion-downloader/test/properties/toPlainText.test.ts index 6986561..529f199 100644 --- a/packages/notion-downloader/test/properties/toPlainText.test.ts +++ b/packages/notion-downloader/test/properties/toPlainText.test.ts @@ -96,7 +96,7 @@ describe("stringifyProperty", () => { { name: "Option2", id: "id_2", color: "red" }, ], } - expect(stringifyProperty(property)).toBe(`["Option1", "Option2"]`) + expect(stringifyProperty(property)).toBe(JSON.stringify(["Option1", "Option2"], null, 2)) }) it("should stringify status property", () => { @@ -169,7 +169,7 @@ describe("stringifyProperty", () => { { external: { url: "file2.jpg" }, name: "file2.jpg" }, ], } - expect(stringifyProperty(property)).toBe(`[ "file1.pn"g," file2.jpg]`") + expect(stringifyProperty(property)).toBe(JSON.stringify(["file1.png", "file2.jpg"], null, 2)) }) it("should stringify created_by property", () => { @@ -302,7 +302,7 @@ describe("stringifyProperty", () => { id: "id_1", people: [sampleUser, sampleUser], } - expect(stringifyProperty(property)).toBe(`["User1", "User1"]`) + expect(stringifyProperty(property)).toBe(JSON.stringify(["User1", "User1"], null, 2)) }) it("should stringify relation property", () => { @@ -311,7 +311,7 @@ describe("stringifyProperty", () => { id: "id_1", relation: [{ id: "rel_1" }, { id: "rel_2" }], } - expect(stringifyProperty(property)).toBe(`["rel_1", "rel_2"]`) + expect(stringifyProperty(property)).toBe(JSON.stringify(["rel_1", "rel_2"], null, 2)) }) it("should stringify rollup property with number", () => {