Skip to content

Commit 9e63561

Browse files
committed
test: add test wrong argument database
1 parent 71faf68 commit 9e63561

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

test/parallel/test-sqlite.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -996,4 +996,16 @@ suite('session extension', () => {
996996
// Since this session is attached to a different database, its changeset should be empty
997997
t.assert.strictEqual(sessionTest.changeset().length, 0);
998998
});
999+
1000+
test("wrong argument name of other database", (t) => {
1001+
const database = new DatabaseSync(':memory:');
1002+
t.assert.throws(() => {
1003+
const session = database.createSession({
1004+
db: 123
1005+
});
1006+
}, {
1007+
name: 'TypeError',
1008+
message: 'The "options.db" argument must be a string.'
1009+
});
1010+
})
9991011
});

0 commit comments

Comments
 (0)