Skip to content

Commit 71c0bfc

Browse files
author
Sylvestre Gug
committed
prettier table-test.mjs
1 parent 333beef commit 71c0bfc

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

test/table-test.mjs

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,10 @@ describe("makeQueryTemplate", () => {
122122
};
123123

124124
const [parts, ...params] = makeQueryTemplate(operations, source);
125-
assert.deepStrictEqual(parts.join("?"), "SELECT t._col1_,t._col2_ FROM table1 t\nWHERE t._col2_ = ?");
125+
assert.deepStrictEqual(
126+
parts.join("?"),
127+
"SELECT t._col1_,t._col2_ FROM table1 t\nWHERE t._col2_ = ?"
128+
);
126129
assert.deepStrictEqual(params, ["val1"]);
127130
});
128131

@@ -195,7 +198,10 @@ describe("makeQueryTemplate", () => {
195198
};
196199

197200
const [parts, ...params] = makeQueryTemplate(operations, source);
198-
assert.deepStrictEqual(parts.join("?"), "SELECT t._col1_,t._col2_ FROM table1 t\nORDER BY t._col1_ ASC, t._col2_ DESC");
201+
assert.deepStrictEqual(
202+
parts.join("?"),
203+
"SELECT t._col1_,t._col2_ FROM table1 t\nORDER BY t._col1_ ASC, t._col2_ DESC"
204+
);
199205
assert.deepStrictEqual(params, []);
200206
});
201207

@@ -252,7 +258,7 @@ describe("makeQueryTemplate", () => {
252258
});
253259

254260
it("makeQueryTemplate select, slice and escape column name with mssql syntax", () => {
255-
const source = {name: "db", dialect: "mssql", escape: (i) => `_${i}_`};
261+
const source = {name: "db", dialect: "mssql", escape: (i) => `_${i}_`};
256262
const operations = {
257263
...baseOperations,
258264
select: {
@@ -262,7 +268,10 @@ describe("makeQueryTemplate", () => {
262268
};
263269

264270
const [parts] = makeQueryTemplate(operations, source);
265-
assert.deepStrictEqual(parts.join("?"), "SELECT t._col1_,t._col2_,t._col3_ FROM table1 t\nORDER BY t._col1_ ASC\nOFFSET 0 ROWS\nFETCH NEXT 100 ROWS ONLY");
271+
assert.deepStrictEqual(
272+
parts.join("?"),
273+
"SELECT t._col1_,t._col2_,t._col3_ FROM table1 t\nORDER BY t._col1_ ASC\nOFFSET 0 ROWS\nFETCH NEXT 100 ROWS ONLY"
274+
);
266275
});
267276

268277
it("makeQueryTemplate select, sort, slice, filter indexed with mssql syntax", () => {
@@ -323,8 +332,8 @@ describe("makeQueryTemplate", () => {
323332
}
324333
]
325334
};
326-
327-
assert.throws(() =>{
335+
336+
assert.throws(() => {
328337
makeQueryTemplate(operations, source);
329338
}, Error);
330339
});

0 commit comments

Comments
 (0)