1
0
Fork 0
mirror of synced 2024-07-13 18:26:06 +12:00

Type and fix test

This commit is contained in:
Adria Navarro 2023-07-17 12:18:57 +02:00
parent 18d2802888
commit 20635ae2ff

View file

@ -1,6 +1,6 @@
// lucene searching not supported in test due to use of PouchDB // lucene searching not supported in test due to use of PouchDB
let rows = [] let rows: Row[] = []
jest.mock("../../api/controllers/row/internalSearch", () => ({ jest.mock("../../sdk/app/rows/search/internalSearch", () => ({
fullSearch: jest.fn(() => { fullSearch: jest.fn(() => {
return { return {
rows, rows,
@ -8,12 +8,13 @@ jest.mock("../../api/controllers/row/internalSearch", () => ({
}), }),
paginatedSearch: jest.fn(), paginatedSearch: jest.fn(),
})) }))
const setup = require("./utilities") import { Row, Table } from "@budibase/types"
import * as setup from "./utilities"
const NAME = "Test" const NAME = "Test"
describe("Test a query step automation", () => { describe("Test a query step automation", () => {
let table let table: Table
let config = setup.getConfig() let config = setup.getConfig()
beforeAll(async () => { beforeAll(async () => {
@ -87,8 +88,8 @@ describe("Test a query step automation", () => {
filters: {}, filters: {},
"filters-def": [ "filters-def": [
{ {
value: null value: null,
} },
], ],
sortColumn: "name", sortColumn: "name",
sortOrder: "ascending", sortOrder: "ascending",