Adding negative test case and fixing build issue.
This commit is contained in:
parent
3de8c53166
commit
dc50515bcc
|
@ -37,13 +37,16 @@ describe("searchInputMapping", () => {
|
|||
})
|
||||
|
||||
it("shouldn't change any other input", () => {
|
||||
const email = "test@test.com"
|
||||
const params: SearchParams = {
|
||||
tableId,
|
||||
query: {
|
||||
equal: {
|
||||
"1:user": "test@test.com",
|
||||
"1:user": email,
|
||||
},
|
||||
},
|
||||
}
|
||||
const output = searchInputMapping(tableWithUserCol, params)
|
||||
expect(output.query.equal!["1:user"]).toBe(email)
|
||||
})
|
||||
})
|
||||
|
|
|
@ -11,7 +11,7 @@ import { db as dbCore } from "@budibase/backend-core"
|
|||
function findColumnInQueries(
|
||||
column: string,
|
||||
options: SearchParams,
|
||||
callback: <T>(filter: T) => T
|
||||
callback: (filter: any) => any
|
||||
) {
|
||||
for (let filterBlock of Object.values(options.query)) {
|
||||
if (typeof filterBlock !== "object") {
|
||||
|
|
Loading…
Reference in New Issue