Skip to content

Commit 3541fe9

Browse files
committed
test: include same test approach for stringifyObjects as true
1 parent b6e11a4 commit 3541fe9

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

test/stringify-objects-as-true.test.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,12 @@ describe('SET with object parameter', () => {
8484
assert.strictEqual(query, "UPDATE users SET '[object Object]'");
8585
});
8686

87+
it('should stringify object when SET is immediately followed by placeholder', () => {
88+
const query = format('UPDATE users SET?', [{ name: 'foo' }]);
89+
90+
assert.strictEqual(query, "UPDATE users SET'[object Object]'");
91+
});
92+
8793
it('should stringify object instead of expanding for INSERT SET clause', () => {
8894
const query = format('INSERT INTO users SET ?', [
8995
{ name: 'foo', email: 'bar@test.com' },

0 commit comments

Comments
 (0)