CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
sagemathinc

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: sagemathinc/cocalc
Path: blob/master/src/packages/database/postgres/schema/util.test.ts
Views: 687
1
import { quoteField } from "./util";
2
3
test("quoting a field", () => {
4
expect(quoteField("Field")).toBe('"Field"');
5
});
6
7
test("quoting an already quoted field does nothing", () => {
8
expect(quoteField('"Field"')).toBe('"Field"');
9
});
10
11
test("quoting a field with a space", () => {
12
expect(quoteField("Field With Space")).toBe('"Field With Space"');
13
});
14
15