Skip to content

Commit 93f1253

Browse files
committed
Add test for raw method
1 parent 12016cf commit 93f1253

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/index.spec.ts

+11-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { inspect } from "util";
2-
import sql, { empty, join, Sql } from "./index";
2+
import sql, { empty, join, raw, Sql } from "./index";
33

44
describe("sql template tag", () => {
55
it("should generate sql", () => {
@@ -93,4 +93,14 @@ describe("sql template tag", () => {
9393
expect(() => join([])).toThrowError(TypeError);
9494
});
9595
});
96+
97+
describe("raw", () => {
98+
it("should accept any string", () => {
99+
const value = Math.random().toString();
100+
const query = raw(value);
101+
102+
expect(query.sql).toEqual(value);
103+
expect(query.values).toEqual([]);
104+
});
105+
});
96106
});

0 commit comments

Comments
 (0)