Skip to content

Commit 1e54b09

Browse files
committed
test: test if the minification was done
1 parent ab4f328 commit 1e54b09

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/index-test.mjs

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,8 @@ describe("minijson", () => {
1515
const fixtureNum = pathInfo.length
1616
for (let iFixture = 0; iFixture !== fixtureNum; ++iFixture) {
1717
it(pathInfo[iFixture].originalFile, () => {
18-
const originalObject = originalInfo[iFixture].originalObject
19-
const minifiedObject = resultInfo[iFixture].minifiedObject
20-
expect(minifiedObject).toEqual(originalObject)
18+
expect(resultInfo[iFixture].minifiedObject).toEqual(originalInfo[iFixture].originalObject)
19+
expect(resultInfo[iFixture].minifiedString).toEqual(JSON.stringify(originalInfo[iFixture].originalObject))
2120
})
2221
}
2322

@@ -34,6 +33,7 @@ describe("minijson", () => {
3433
for (let iFixture = 0; iFixture !== fixtureNum; ++iFixture) {
3534
it(pathInfo[iFixture].originalFile, () => {
3635
expect(resultInfo[iFixture].minifiedObject).toEqual(originalInfo[iFixture].originalObject)
36+
expect(resultInfo[iFixture].minifiedString).toEqual(JSON.stringify(originalInfo[iFixture].originalObject))
3737
})
3838
}
3939

0 commit comments

Comments
 (0)