Budibase is an open-source low-code platform for creating internal apps in minutes. Supports PostgreSQL, MySQL, MSSQL, MongoDB, Rest API, Docker, K8s 🚀
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

22 lines
693 B

import { getMemoryStore } from "./specHelpers"
import { createIndexFile } from "../src/indexing/sharding"
import { uniqueIndexName } from "../src/indexing/read"
import { includes } from "lodash"
describe("indexing.createIndexFile", () => {
it("should create an empty document <indexkey>.csv", async () => {
const datastore = getMemoryStore()
const index = {
map: "return {name: record.name, age: record.age}",
filter: "",
}
const indexKey = `/customers/hello`
await datastore.createFolder("/customers")
await createIndexFile(datastore, indexKey, index)
const savedIndex = await datastore.loadFile(indexKey)
expect(savedIndex).toBe("")
})
})