Test multiple relationship types
This commit is contained in:
parent
57ce8b7e85
commit
5f1cd4eb9f
|
@ -2278,12 +2278,16 @@ describe.each([
|
||||||
// It also can't work for in-memory searching because the related table name
|
// It also can't work for in-memory searching because the related table name
|
||||||
// isn't available.
|
// isn't available.
|
||||||
!isInMemory &&
|
!isInMemory &&
|
||||||
describe("relations", () => {
|
describe.each([
|
||||||
|
RelationshipType.ONE_TO_MANY,
|
||||||
|
RelationshipType.MANY_TO_ONE,
|
||||||
|
RelationshipType.MANY_TO_MANY,
|
||||||
|
])("relations (%s)", relationshipType => {
|
||||||
let productCategoryTable: Table, productCatRows: Row[]
|
let productCategoryTable: Table, productCatRows: Row[]
|
||||||
|
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
const { relatedTable, tableId } = await basicRelationshipTables(
|
const { relatedTable, tableId } = await basicRelationshipTables(
|
||||||
RelationshipType.ONE_TO_MANY
|
relationshipType
|
||||||
)
|
)
|
||||||
tableOrViewId = tableId
|
tableOrViewId = tableId
|
||||||
productCategoryTable = relatedTable
|
productCategoryTable = relatedTable
|
||||||
|
@ -2538,10 +2542,13 @@ describe.each([
|
||||||
})
|
})
|
||||||
|
|
||||||
isSql &&
|
isSql &&
|
||||||
describe("big relations", () => {
|
describe.each([
|
||||||
|
RelationshipType.MANY_TO_ONE,
|
||||||
|
RelationshipType.MANY_TO_MANY,
|
||||||
|
])("big relations (%s)", relationshipType => {
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
const { relatedTable, tableId } = await basicRelationshipTables(
|
const { relatedTable, tableId } = await basicRelationshipTables(
|
||||||
RelationshipType.MANY_TO_ONE
|
relationshipType
|
||||||
)
|
)
|
||||||
tableOrViewId = tableId
|
tableOrViewId = tableId
|
||||||
const mainRow = await config.api.row.save(tableOrViewId, {
|
const mainRow = await config.api.row.save(tableOrViewId, {
|
||||||
|
|
Loading…
Reference in New Issue