Skip to content

Commit fd61067

Browse files
committed
test shorten
1 parent 5c6c0b5 commit fd61067

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

test/parallel/test-sqlite-data-types.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,13 @@ suite('data binding and mapping', () => {
9393
buf: null,
9494
});
9595

96-
const insertNamedParams = db.prepare('INSERT INTO types VALUES ($key, $int, $double, $text, $buf)');
97-
const params = { key: 6, int: undefined, double: undefined, text: undefined, buf: undefined };
98-
t.assert.deepStrictEqual(insertNamedParams.run(params), { changes: 1, lastInsertRowid: 6 });
99-
t.assert.deepStrictEqual(insertNamedParams.run({ key: 7 }), { changes: 1, lastInsertRowid: 7 });
100-
t.assert.deepStrictEqual(query.get(6), { __proto__: null, key: 6, int: null, double: null, text: null, buf: null });
101-
t.assert.deepStrictEqual(query.get(7), { __proto__: null, key: 7, int: null, double: null, text: null, buf: null });
96+
const insertNamed = db.prepare('INSERT INTO types VALUES ($key, $int, $double, $text, $buf)');
97+
const params = { int: undefined, double: undefined, text: undefined, buf: undefined };
98+
const nulls = { int: null, double: null, text: null, buf: null };
99+
t.assert.deepStrictEqual(insertNamed.run({ key: 6, ...params }), { changes: 1, lastInsertRowid: 6 });
100+
t.assert.deepStrictEqual(insertNamed.run({ key: 7 }), { changes: 1, lastInsertRowid: 7 });
101+
t.assert.deepStrictEqual(query.get(6), { __proto__: null, key: 6, ...nulls });
102+
t.assert.deepStrictEqual(query.get(7), { __proto__: null, key: 7, ...nulls });
102103
});
103104

104105
test('large strings are bound correctly', (t) => {

0 commit comments

Comments
 (0)