This commit is contained in:
Adria Navarro 2023-09-12 21:09:25 +02:00
parent eee8a2e5f9
commit 0c8a8e1b26
1 changed files with 11 additions and 12 deletions

View File

@ -39,6 +39,7 @@ describe.each([
let request = setup.getRequest() let request = setup.getRequest()
let config = setup.getConfig() let config = setup.getConfig()
let table: Table let table: Table
let tableId: string
afterAll(setup.afterAll) afterAll(setup.afterAll)
@ -131,15 +132,13 @@ describe.each([
} }
: undefined : undefined
beforeAll(async () => {
const tableConfig = generateTableConfig()
const table = await config.createTable(tableConfig)
tableId = table._id!
})
describe("save, load, update", () => { describe("save, load, update", () => {
let tableId: string
beforeAll(async () => {
const tableConfig = generateTableConfig()
const table = await config.createTable(tableConfig)
tableId = table._id!
})
it("returns a success message when the row is created", async () => { it("returns a success message when the row is created", async () => {
const rowUsage = await getRowUsage() const rowUsage = await getRowUsage()
const queryUsage = await getQueryUsage() const queryUsage = await getQueryUsage()
@ -626,7 +625,7 @@ describe.each([
}) })
describe("bulkDelete", () => { describe("bulkDelete", () => {
beforeEach(async () => { beforeAll(async () => {
const tableConfig = generateTableConfig() const tableConfig = generateTableConfig()
table = await config.createTable(tableConfig) table = await config.createTable(tableConfig)
}) })
@ -790,7 +789,7 @@ describe.each([
}) })
describe("fetchEnrichedRows", () => { describe("fetchEnrichedRows", () => {
beforeEach(async () => { beforeAll(async () => {
const tableConfig = generateTableConfig() const tableConfig = generateTableConfig()
table = await config.createTable(tableConfig) table = await config.createTable(tableConfig)
}) })
@ -861,7 +860,7 @@ describe.each([
isInternal && isInternal &&
describe("attachments", () => { describe("attachments", () => {
beforeEach(async () => { beforeAll(async () => {
const tableConfig = generateTableConfig() const tableConfig = generateTableConfig()
table = await config.createTable(tableConfig) table = await config.createTable(tableConfig)
}) })
@ -892,7 +891,7 @@ describe.each([
}) })
describe("exportData", () => { describe("exportData", () => {
beforeEach(async () => { beforeAll(async () => {
const tableConfig = generateTableConfig() const tableConfig = generateTableConfig()
table = await config.createTable(tableConfig) table = await config.createTable(tableConfig)
}) })