We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9c933ed commit f3bec8cCopy full SHA for f3bec8c
tests/tests/sqlite/rawQueries.spec.ts
@@ -629,5 +629,25 @@ export function registerBaseTests() {
629
630
expect(duration).lessThan(2000);
631
});
632
+
633
+ it('Should use WAL', async () => {
634
+ for (let i = 0; i < 5; i++) {
635
+ let db: QuickSQLiteConnection;
636
+ try {
637
+ db = open('test-wal' + i, {
638
+ numReadConnections: NUM_READ_CONNECTIONS
639
+ });
640
641
+ const journalMode = await db.execute('PRAGMA journal_mode');
642
+ const journalModeRO = await db.readLock((tx) => tx.execute('PRAGMA journal_mode'));
643
+ expect(journalMode.rows.item(0).journal_mode).equals('wal');
644
645
+ expect(journalModeRO.rows.item(0).journal_mode).equals('wal');
646
+ } finally {
647
+ db?.close();
648
+ db?.delete();
649
+ }
650
651
652
653
}
0 commit comments