Skip to content

Commit 02d12b0

Browse files
committed
sqlite: fix linter isues
1 parent 58ca77f commit 02d12b0

File tree

2 files changed

+33
-33
lines changed

2 files changed

+33
-33
lines changed

test/parallel/test-sqlite-database-async.mjs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -125,11 +125,11 @@ suite('Database() constructor', () => {
125125
CREATE TABLE bar (foo_id INTEGER REFERENCES foo(id));
126126
`);
127127
t.after(() => { db.close(); });
128-
await t.assert.rejects(db.exec('INSERT INTO bar (foo_id) VALUES (1)')
129-
, {
130-
code: 'ERR_SQLITE_ERROR',
131-
message: 'FOREIGN KEY constraint failed',
132-
});
128+
await t.assert.rejects(db.exec('INSERT INTO bar (foo_id) VALUES (1)'),
129+
{
130+
code: 'ERR_SQLITE_ERROR',
131+
message: 'FOREIGN KEY constraint failed',
132+
});
133133
});
134134

135135
test('allows disabling foreign key constraints', (t) => {
@@ -396,11 +396,11 @@ suite('Database.prototype.exec()', () => {
396396
t.after(() => { db.close(); });
397397

398398
await t.assert.rejects(
399-
db.exec('CREATE TABLEEEE')
400-
, {
401-
code: 'ERR_SQLITE_ERROR',
402-
message: /syntax error/,
403-
});
399+
db.exec('CREATE TABLEEEE'),
400+
{
401+
code: 'ERR_SQLITE_ERROR',
402+
message: /syntax error/,
403+
});
404404
});
405405

406406
test('throws if the URL does not have the file: scheme', (t) => {

test/parallel/test-sqlite-statement-async.js

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,8 @@ suite('Statement.prototype.run()', () => {
194194
);
195195
t.assert.strictEqual(setup, undefined);
196196
const stmt = db.prepare('INSERT INTO data (key, val) VALUES (?, ?)');
197-
t.assert.throws(() =>{
198-
stmt.run(1, 2, 3)
197+
t.assert.throws(() => {
198+
stmt.run(1, 2, 3);
199199
}, {
200200
code: 'ERR_SQLITE_ERROR',
201201
message: 'column index out of range',
@@ -213,13 +213,13 @@ suite('Statement.prototype.run()', () => {
213213
t.assert.strictEqual(setup, undefined);
214214
const stmt = db.prepare('INSERT INTO data (key, val) VALUES (?, ?)');
215215
await t.assert.rejects(
216-
stmt.run(1)
217-
, {
218-
code: 'ERR_SQLITE_ERROR',
219-
message: 'NOT NULL constraint failed: data.val',
220-
errcode: 1299,
221-
errstr: 'constraint failed',
222-
});
216+
stmt.run(1),
217+
{
218+
code: 'ERR_SQLITE_ERROR',
219+
message: 'NOT NULL constraint failed: data.val',
220+
errcode: 1299,
221+
errstr: 'constraint failed',
222+
});
223223
});
224224

225225
test('returns correct metadata when using RETURNING', async (t) => {
@@ -251,13 +251,13 @@ suite('Statement.prototype.run()', () => {
251251
const stmt = db.prepare('INSERT INTO data (key, val) VALUES (?1, ?3)');
252252

253253
await t.assert.rejects(
254-
stmt.run(1)
255-
, {
256-
code: 'ERR_SQLITE_ERROR',
257-
message: 'NOT NULL constraint failed: data.val',
258-
errcode: 1299,
259-
errstr: 'constraint failed',
260-
});
254+
stmt.run(1),
255+
{
256+
code: 'ERR_SQLITE_ERROR',
257+
message: 'NOT NULL constraint failed: data.val',
258+
errcode: 1299,
259+
errstr: 'constraint failed',
260+
});
261261
});
262262

263263
test('binds ?NNN params by position', async (t) => {
@@ -360,11 +360,11 @@ suite('Statement.prototype.setReadBigInts()', () => {
360360
t.after(() => { db.close(); });
361361
const bad = db.prepare(`SELECT ${Number.MAX_SAFE_INTEGER} + 1`);
362362
await t.assert.rejects(
363-
bad.get()
364-
, {
365-
code: 'ERR_OUT_OF_RANGE',
366-
message: /^Value is too large to be represented as a JavaScript number: 9007199254740992$/,
367-
});
363+
bad.get(),
364+
{
365+
code: 'ERR_OUT_OF_RANGE',
366+
message: /^Value is too large to be represented as a JavaScript number: 9007199254740992$/,
367+
});
368368
const good = db.prepare(`SELECT ${Number.MAX_SAFE_INTEGER} + 1`);
369369
good.setReadBigInts(true);
370370
t.assert.deepStrictEqual(await good.get(), {
@@ -580,8 +580,8 @@ suite('Statement.prototype.setAllowBareNamedParameters()', () => {
580580
{ changes: 1, lastInsertRowid: 1 },
581581
);
582582
t.assert.strictEqual(stmt.setAllowBareNamedParameters(false), undefined);
583-
t.assert.throws(() =>{
584-
stmt.run({ k: 2, v: 4 })
583+
t.assert.throws(() => {
584+
stmt.run({ k: 2, v: 4 });
585585
}, {
586586
code: 'ERR_INVALID_STATE',
587587
message: /Unknown named parameter 'k'/,

0 commit comments

Comments
 (0)