Skip to content

Commit 37f3bf4

Browse files
authored
line <= 80 chars
1 parent 262ccec commit 37f3bf4

File tree

1 file changed

+22
-6
lines changed

1 file changed

+22
-6
lines changed

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

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,15 +83,31 @@ suite('data binding and mapping', () => {
8383

8484
const nulls = { int: null, double: null, text: null, buf: null };
8585
const undefArray = [ undefined, undefined, undefined, undefined ];
86-
const undefObj = { int: undefined, double: undefined, text: undefined, buf: undefined };
86+
const undefObj = {
87+
int: undefined,
88+
double: undefined,
89+
text: undefined,
90+
buf: undefined,
91+
};
8792
const insertAnon = db.prepare('INSERT INTO types VALUES (?, ?, ?, ?, ?)');
88-
const insertNamed = db.prepare('INSERT INTO types VALUES ($key, $int, $double, $text, $buf)');
89-
t.assert.deepStrictEqual(insertAnon.run(5, ...undefArray), { changes: 1, lastInsertRowid: 5 });
90-
t.assert.deepStrictEqual(insertNamed.run({ key: 6, ...undefObj }), { changes: 1, lastInsertRowid: 6 });
91-
t.assert.deepStrictEqual(insertNamed.run({ key: 7 }), { changes: 1, lastInsertRowid: 7 });
92-
t.assert.deepStrictEqual(query.get(5), { __proto__: null, key: 5, ...nulls });
93+
const insertNamed = db.prepare(
94+
'INSERT INTO types VALUES ($key, $int, $double, $text, $buf)'
95+
);
96+
t.assert.deepStrictEqual(
97+
insertAnon.run(6, ...undefArray),
98+
{ lastInsertRowid: 6, changes: 1 },
99+
);
100+
t.assert.deepStrictEqual(
101+
insertNamed.run({ key: 7, ...undefObj }),
102+
{ lastInsertRowid: 7, changes: 1 },
103+
);
104+
t.assert.deepStrictEqual(
105+
insertNamed.run({ key: 8 }),
106+
{ lastInsertRowid: 8, changes: 1 },
107+
);
93108
t.assert.deepStrictEqual(query.get(6), { __proto__: null, key: 6, ...nulls });
94109
t.assert.deepStrictEqual(query.get(7), { __proto__: null, key: 7, ...nulls });
110+
t.assert.deepStrictEqual(query.get(8), { __proto__: null, key: 8, ...nulls });
95111
});
96112

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

0 commit comments

Comments
 (0)