From 1e54b0953eff93c298aa4bbc58c62f2e32eaf1b1 Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Fri, 6 Sep 2024 23:25:43 -0700 Subject: [PATCH] test: test if the minification was done --- test/index-test.mjs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/index-test.mjs b/test/index-test.mjs index d935bcd..6c1670c 100644 --- a/test/index-test.mjs +++ b/test/index-test.mjs @@ -15,9 +15,8 @@ describe("minijson", () => { const fixtureNum = pathInfo.length for (let iFixture = 0; iFixture !== fixtureNum; ++iFixture) { it(pathInfo[iFixture].originalFile, () => { - const originalObject = originalInfo[iFixture].originalObject - const minifiedObject = resultInfo[iFixture].minifiedObject - expect(minifiedObject).toEqual(originalObject) + expect(resultInfo[iFixture].minifiedObject).toEqual(originalInfo[iFixture].originalObject) + expect(resultInfo[iFixture].minifiedString).toEqual(JSON.stringify(originalInfo[iFixture].originalObject)) }) } @@ -34,6 +33,7 @@ describe("minijson", () => { for (let iFixture = 0; iFixture !== fixtureNum; ++iFixture) { it(pathInfo[iFixture].originalFile, () => { expect(resultInfo[iFixture].minifiedObject).toEqual(originalInfo[iFixture].originalObject) + expect(resultInfo[iFixture].minifiedString).toEqual(JSON.stringify(originalInfo[iFixture].originalObject)) }) }