Adding parameterised tests.
This commit is contained in:
parent
13ac273c83
commit
b3d07aa228
|
@ -2109,25 +2109,28 @@ describe.each([
|
|||
})
|
||||
})
|
||||
|
||||
describe("special data_ case", () => {
|
||||
describe.each(["data_name_test", "name_data_test", "name_test_data_"])(
|
||||
"special (%s) case",
|
||||
column => {
|
||||
beforeAll(async () => {
|
||||
table = await createTable({
|
||||
name_data_test: {
|
||||
name: "name_data_test",
|
||||
[column]: {
|
||||
name: column,
|
||||
type: FieldType.STRING,
|
||||
},
|
||||
})
|
||||
await createRows([{ name_data_test: "a" }, { name_data_test: "b" }])
|
||||
await createRows([{ [column]: "a" }, { [column]: "b" }])
|
||||
})
|
||||
|
||||
it("should be able to query a column with data_ in it", async () => {
|
||||
await expectSearch({
|
||||
query: {
|
||||
equal: {
|
||||
["1:name_data_test"]: "a",
|
||||
[`1:${column}`]: "a",
|
||||
},
|
||||
},
|
||||
}).toContainExactly([{ name_data_test: "a" }])
|
||||
})
|
||||
}).toContainExactly([{ [column]: "a" }])
|
||||
})
|
||||
}
|
||||
)
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue