Files
beekeeper-studio/apps/studio/tests/unit/shared/lib/dialects/bigquery.spec.js
Matthew Rathbone b829d49fc1 Tests for html comment removal in minify
- Works according to the html spec

Fix: #2421
2024-09-13 11:05:50 -05:00

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)
})
})
})