Updating test cases as per PR comments.
This commit is contained in:
parent
4068df6025
commit
0c51a60e9a
|
@ -176,11 +176,18 @@ describe("Captures of real examples", () => {
|
|||
})
|
||||
|
||||
describe("check some edge cases", () => {
|
||||
const dotTableNames = ["hello.world", "foo.bar.baz"]
|
||||
|
||||
it("should handle table names/columns with dots in them", () => {
|
||||
const tableNames = ["hello.world", "foo.bar.baz"]
|
||||
const aliasing = new AliasTables(tableNames)
|
||||
const aliased = aliasing.aliasField("hello.world.field")
|
||||
expect(aliased).toEqual("a.field")
|
||||
const aliasing = new AliasTables(dotTableNames)
|
||||
const aliased = aliasing.aliasField(`"hello.world"."field"`)
|
||||
expect(aliased).toEqual(`"a"."field"`)
|
||||
})
|
||||
|
||||
it("should confirm table with dots in them works with grave accents", () => {
|
||||
const aliasing = new AliasTables(dotTableNames)
|
||||
const aliased = aliasing.aliasField("`hello.world`.`field`")
|
||||
expect(aliased).toEqual("`a`.`field`")
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue