Skip to content

Commit e3ecdc5

Browse files
authored
test(angular-query-experimental/injectQueries): move 'effect' into 'constructor' to follow Angular convention (TanStack#10537)
1 parent 4ae65fa commit e3ecdc5

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

packages/angular-query-experimental/src/__tests__/inject-queries.test.ts

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,12 @@ describe('injectQueries', () => {
5858
],
5959
}))
6060

61-
_ = effect(() => {
62-
const snapshot = this.result().map((q) => ({ data: q.data() }))
63-
results.push(snapshot)
64-
})
61+
constructor() {
62+
effect(() => {
63+
const snapshot = this.result().map((q) => ({ data: q.data() }))
64+
results.push(snapshot)
65+
})
66+
}
6567
}
6668

6769
const rendered = await render(Page, {
@@ -111,9 +113,11 @@ describe('injectQueries', () => {
111113
}),
112114
}))
113115

114-
_ = effect(() => {
115-
results.push({ ...this.combined() })
116-
})
116+
constructor() {
117+
effect(() => {
118+
results.push({ ...this.combined() })
119+
})
120+
}
117121
}
118122

119123
const rendered = await render(Page, {

0 commit comments

Comments
 (0)