We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 00d34c2 commit 940918bCopy full SHA for 940918b
test/unit/test-SqlString.js
@@ -11,6 +11,18 @@ test('SqlString.escapeId', {
11
assert.equal(SqlString.escapeId(42), '`42`');
12
},
13
14
+ 'value can be an object': function() {
15
+ assert.equal(SqlString.escapeId({}), '`[object Object]`');
16
+ },
17
+
18
+ 'value toString is called': function() {
19
+ assert.equal(SqlString.escapeId({ toString: function() { return 'foo'; } }), '`foo`');
20
21
22
+ 'value toString is quoted': function() {
23
+ assert.equal(SqlString.escapeId({ toString: function() { return 'f`oo'; } }), '`f``oo`');
24
25
26
'value containing escapes is quoted': function() {
27
assert.equal(SqlString.escapeId('i`d'), '`i``d`');
28
0 commit comments