Skip to content

Commit

Permalink
test: test if the minification was done
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Sep 7, 2024
1 parent ab4f328 commit 1e54b09
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/index-test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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))
})
}

Expand All @@ -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))
})
}

Expand Down

0 comments on commit 1e54b09

Please sign in to comment.