Skip to content

Commit 6425e6d

Browse files
use watch method for consistency
1 parent e094cec commit 6425e6d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tools/powersynctests/src/tests/queries.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ export function registerBaseTests() {
530530

531531
it('Should reflect writeTransaction updates on read connections (iterator)', async () => {
532532
const watched = new Promise<void>(async (resolve) => {
533-
for await (const result of db.watchWithAsyncGenerator('SELECT COUNT(*) as count FROM users', [])) {
533+
for await (const result of db.watch('SELECT COUNT(*) as count FROM users', [])) {
534534
if (result.rows?.item(0).count == 1) {
535535
resolve();
536536
}
@@ -549,7 +549,7 @@ export function registerBaseTests() {
549549
let error: Error | undefined;
550550
try {
551551
// The table here does not exist, so it should throw an error
552-
for await (const result of db.watchWithAsyncGenerator('SELECT COUNT(*) as count FROM faketable', [])) {
552+
for await (const result of db.watch('SELECT COUNT(*) as count FROM faketable', [])) {
553553
}
554554
} catch (ex) {
555555
error = ex as Error;
@@ -562,7 +562,7 @@ export function registerBaseTests() {
562562
let error: Error | undefined;
563563
try {
564564
// Invalid SQL
565-
for await (const result of db.watchWithAsyncGenerator('invalidsyntax', [])) {
565+
for await (const result of db.watch('invalidsyntax', [])) {
566566
}
567567
} catch (ex) {
568568
error = ex as Error;

0 commit comments

Comments
 (0)