From ab5f77c762db2bd36ca8aa6be45df51f9bd7070a Mon Sep 17 00:00:00 2001 From: ianlv Date: Wed, 2 Jul 2025 18:11:49 +0800 Subject: [PATCH] chore: fix some minor issues in the comments Signed-off-by: ianlv --- packages/syncers/src/BaseSyncer.ts | 6 +++--- packages/syncers/test/__snapshots__/BaseSyncer.test.ts.snap | 4 ++-- .../syncers/test/__snapshots__/PeriodicUpdater.test.ts.snap | 4 ++-- .../syncers/test/__snapshots__/StatsSyncer.test.ts.snap | 2 +- .../syncers/test/__snapshots__/SyncerManager.test.ts.snap | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/syncers/src/BaseSyncer.ts b/packages/syncers/src/BaseSyncer.ts index 48949a46e..2cdf5d72a 100644 --- a/packages/syncers/src/BaseSyncer.ts +++ b/packages/syncers/src/BaseSyncer.ts @@ -60,7 +60,7 @@ export class BaseSyncer { }); this.worker.on("failed", (_, err) => { - this.logger.error(new ErrorException("A worker error ocurred", err)); + this.logger.error(new ErrorException("A worker error occurred", err)); }); this.connection = connection; @@ -82,7 +82,7 @@ export class BaseSyncer { } catch (err) { throw new SyncerError( this.name, - "An error ocurred when starting syncer", + "An error occurred when starting syncer", err ); } @@ -117,7 +117,7 @@ export class BaseSyncer { } catch (err) { const err_ = new SyncerError( this.name, - "An error ocurred when performing closing operation", + "An error occurred when performing closing operation", err ); diff --git a/packages/syncers/test/__snapshots__/BaseSyncer.test.ts.snap b/packages/syncers/test/__snapshots__/BaseSyncer.test.ts.snap index dba557d81..1475b22fa 100644 --- a/packages/syncers/test/__snapshots__/BaseSyncer.test.ts.snap +++ b/packages/syncers/test/__snapshots__/BaseSyncer.test.ts.snap @@ -1,9 +1,9 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`PeriodicUpdater > should throw a valid error when failing to close it 1`] = `"Syncer \\"test-updater-syncer\\" failed: An error ocurred when performing closing operation"`; +exports[`PeriodicUpdater > should throw a valid error when failing to close it 1`] = `"Syncer \\"test-updater-syncer\\" failed: An error occurred when performing closing operation"`; exports[`PeriodicUpdater > should throw a valid error when failing to close it 2`] = `[Error: Queue closing error]`; -exports[`PeriodicUpdater > when running an updater > should throw a valid error when failing to run 1`] = `"Syncer \\"test-updater-syncer\\" failed: An error ocurred when starting syncer"`; +exports[`PeriodicUpdater > when running an updater > should throw a valid error when failing to run 1`] = `"Syncer \\"test-updater-syncer\\" failed: An error occurred when starting syncer"`; exports[`PeriodicUpdater > when running an updater > should throw a valid error when failing to run 2`] = `[Error: Queue error]`; diff --git a/packages/syncers/test/__snapshots__/PeriodicUpdater.test.ts.snap b/packages/syncers/test/__snapshots__/PeriodicUpdater.test.ts.snap index 5c860cbe0..cb146425e 100644 --- a/packages/syncers/test/__snapshots__/PeriodicUpdater.test.ts.snap +++ b/packages/syncers/test/__snapshots__/PeriodicUpdater.test.ts.snap @@ -1,9 +1,9 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`PeriodicUpdater > should throw a valid error when failing to close it 1`] = `"Updater \\"test-updater-updater\\" failed: An error ocurred when performing closing operation"`; +exports[`PeriodicUpdater > should throw a valid error when failing to close it 1`] = `"Updater \\"test-updater-updater\\" failed: An error occurred when performing closing operation"`; exports[`PeriodicUpdater > should throw a valid error when failing to close it 2`] = `[Error: Queue closing error]`; -exports[`PeriodicUpdater > when running an updater > should throw a valid error when failing to run 1`] = `"Updater \\"test-updater-updater\\" failed: An error ocurred when starting updater"`; +exports[`PeriodicUpdater > when running an updater > should throw a valid error when failing to run 1`] = `"Updater \\"test-updater-updater\\" failed: An error occurred when starting updater"`; exports[`PeriodicUpdater > when running an updater > should throw a valid error when failing to run 2`] = `[Error: Queue error]`; diff --git a/packages/syncers/test/__snapshots__/StatsSyncer.test.ts.snap b/packages/syncers/test/__snapshots__/StatsSyncer.test.ts.snap index 1ab5d442b..58a18dfdb 100644 --- a/packages/syncers/test/__snapshots__/StatsSyncer.test.ts.snap +++ b/packages/syncers/test/__snapshots__/StatsSyncer.test.ts.snap @@ -1,6 +1,6 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`StatsSyncer > when closing the stats syncer > should throw a valid error when failing to close it 1`] = `"Stats syncer failed: An error ocurred when closing syncer"`; +exports[`StatsSyncer > when closing the stats syncer > should throw a valid error when failing to close it 1`] = `"Stats syncer failed: An error occurred when closing syncer"`; exports[`StatsSyncer > when closing the stats syncer > should throw a valid error when failing to close it 2`] = `[Error: Some daily stats updater closing error]`; diff --git a/packages/syncers/test/__snapshots__/SyncerManager.test.ts.snap b/packages/syncers/test/__snapshots__/SyncerManager.test.ts.snap index 606d6a8bc..39414ccba 100644 --- a/packages/syncers/test/__snapshots__/SyncerManager.test.ts.snap +++ b/packages/syncers/test/__snapshots__/SyncerManager.test.ts.snap @@ -1,6 +1,6 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`SyncerManager > when closing the syncer manager > should throw a valid error when failing to close it 1`] = `"Periodic updater manager failed: An error ocurred when closing syncers"`; +exports[`SyncerManager > when closing the syncer manager > should throw a valid error when failing to close it 1`] = `"Periodic updater manager failed: An error occurred when closing syncers"`; exports[`SyncerManager > when closing the syncer manager > should throw a valid error when failing to close it 2`] = `[Error: Some daily stats updater closing error]`;