From e3ecdc525f682f33ad61093e173d6a694cd35677 Mon Sep 17 00:00:00 2001 From: Wonsuk Choi Date: Tue, 21 Apr 2026 02:40:18 +0900 Subject: [PATCH 1/2] test(angular-query-experimental/injectQueries): move 'effect' into 'constructor' to follow Angular convention (#10537) --- .../src/__tests__/inject-queries.test.ts | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/packages/angular-query-experimental/src/__tests__/inject-queries.test.ts b/packages/angular-query-experimental/src/__tests__/inject-queries.test.ts index 57fe3ed8af..d8fc60d233 100644 --- a/packages/angular-query-experimental/src/__tests__/inject-queries.test.ts +++ b/packages/angular-query-experimental/src/__tests__/inject-queries.test.ts @@ -58,10 +58,12 @@ describe('injectQueries', () => { ], })) - _ = effect(() => { - const snapshot = this.result().map((q) => ({ data: q.data() })) - results.push(snapshot) - }) + constructor() { + effect(() => { + const snapshot = this.result().map((q) => ({ data: q.data() })) + results.push(snapshot) + }) + } } const rendered = await render(Page, { @@ -111,9 +113,11 @@ describe('injectQueries', () => { }), })) - _ = effect(() => { - results.push({ ...this.combined() }) - }) + constructor() { + effect(() => { + results.push({ ...this.combined() }) + }) + } } const rendered = await render(Page, { From 646f04ef08f1af041c997cba2b4d3d4dba88b725 Mon Sep 17 00:00:00 2001 From: Wonsuk Choi Date: Tue, 21 Apr 2026 02:53:09 +0900 Subject: [PATCH 2/2] test(angular-query-persist-client/withPersistQueryClient): move 'effect' into 'constructor' to follow Angular convention (#10538) --- .../with-persist-query-client.test.ts | 45 +++++++++++-------- 1 file changed, 27 insertions(+), 18 deletions(-) diff --git a/packages/angular-query-persist-client/src/__tests__/with-persist-query-client.test.ts b/packages/angular-query-persist-client/src/__tests__/with-persist-query-client.test.ts index 3190867140..093efb825a 100644 --- a/packages/angular-query-persist-client/src/__tests__/with-persist-query-client.test.ts +++ b/packages/angular-query-persist-client/src/__tests__/with-persist-query-client.test.ts @@ -97,13 +97,16 @@ describe('withPersistQueryClient', () => { queryKey: key, queryFn: () => sleep(10).then(() => 'fetched'), })) - _ = effect(() => { - states.push({ - status: this.state.status(), - fetchStatus: this.state.fetchStatus(), - data: this.state.data(), + + constructor() { + effect(() => { + states.push({ + status: this.state.status(), + fetchStatus: this.state.fetchStatus(), + data: this.state.data(), + }) }) - }) + } } const rendered = await render(Page, { @@ -189,13 +192,16 @@ describe('withPersistQueryClient', () => { // otherwise initialData would be newer and takes precedence initialDataUpdatedAt: 1, })) - _ = effect(() => { - states.push({ - status: this.state.status(), - fetchStatus: this.state.fetchStatus(), - data: this.state.data(), + + constructor() { + effect(() => { + states.push({ + status: this.state.status(), + fetchStatus: this.state.fetchStatus(), + data: this.state.data(), + }) }) - }) + } } const rendered = await render(Page, { @@ -280,13 +286,16 @@ describe('withPersistQueryClient', () => { }, staleTime: Infinity, })) - _ = effect(() => { - states.push({ - status: this.state.status(), - fetchStatus: this.state.fetchStatus(), - data: this.state.data(), + + constructor() { + effect(() => { + states.push({ + status: this.state.status(), + fetchStatus: this.state.fetchStatus(), + data: this.state.data(), + }) }) - }) + } } const rendered = await render(Page, {