Quick test to avoid scenario in future.

This commit is contained in:
mike12345567 2023-09-12 14:23:08 +01:00
parent aed5694ac2
commit 80e217afda
1 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1,21 @@
import * as utils from "../utils"
describe("removeEmptyFilters", () => {
it("0 should not be removed", () => {
const filters = utils.removeEmptyFilters({
equal: {
column: 0,
},
})
expect((filters.equal as any).column).toBe(0)
})
it("empty string should be removed", () => {
const filters = utils.removeEmptyFilters({
equal: {
column: "",
},
})
expect(Object.values(filters.equal as any).length).toBe(0)
})
})