mirror of
https://github.com/beekeeper-studio/beekeeper-studio.git
synced 2026-03-13 10:12:54 +08:00
24 lines
528 B
JavaScript
24 lines
528 B
JavaScript
import { BigQueryData } from "@/shared/lib/dialects/bigquery"
|
|
|
|
|
|
|
|
|
|
describe("bigquery DialectData", () => {
|
|
|
|
it("Should escape identifiers properly", () => {
|
|
|
|
const testSet = [
|
|
["foo\\bar", "`foo\\\\bar`"],
|
|
["foo`bar", "`foo\\`bar`"],
|
|
["foo\\ba`r", "`foo\\\\ba\\`r`"]
|
|
]
|
|
testSet.forEach(([input, expected]) => {
|
|
const output = BigQueryData.wrapIdentifier(input)
|
|
console.log("INPUT", input, "OUTPUT", output, "EXPECTED", expected)
|
|
expect(output).toEqual(expected)
|
|
})
|
|
|
|
|
|
})
|
|
})
|