Improve link controller tests

This commit is contained in:
adrinr 2023-02-03 17:59:15 +00:00
parent bc09cb76f1
commit 9f8522a901
1 changed files with 4 additions and 1 deletions

View File

@ -9,10 +9,13 @@ describe("test the link controller", () => {
let config = new TestConfig(false) let config = new TestConfig(false)
let table1, table2, appId let table1, table2, appId
beforeEach(async () => { beforeAll(async () => {
config.modeCloud() config.modeCloud()
const app = await config.init() const app = await config.init()
appId = app.appId appId = app.appId
})
beforeEach(async () => {
const { _id } = await config.createTable() const { _id } = await config.createTable()
table2 = await config.createLinkedTable(RelationshipTypes.MANY_TO_MANY, ["link", "link2"]) table2 = await config.createLinkedTable(RelationshipTypes.MANY_TO_MANY, ["link", "link2"])
// update table after creating link // update table after creating link