Skip to content

Commit fe11966

Browse files
committed
test: create changeset when database is closed results in exception
1 parent 8269259 commit fe11966

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

test/parallel/test-sqlite.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -797,3 +797,15 @@ test('trying to create session when database is closed results in exception', (t
797797
message: 'database is not open',
798798
});
799799
});
800+
801+
test('trying to create changeset when database is closed results in exception', (t) => {
802+
const database = new DatabaseSync(':memory:');
803+
const session = database.createSession();
804+
database.close();
805+
t.assert.throws(() => {
806+
session.changeset();
807+
}, {
808+
name: 'Error',
809+
message: 'database is not open',
810+
});
811+
});

0 commit comments

Comments
 (0)