MCPcopy Create free account
hub / github.com/TanStack/query / FakeComponent

Class FakeComponent

packages/angular-query/src/__tests__/inject-query.test.ts:1006–1018  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1004
1005 it('should render with required signal inputs', async () => {
1006 @Component({
1007 selector: 'app-fake',
1008 template: `{{ query.data() }}`,
1009 changeDetection: ChangeDetectionStrategy.OnPush,
1010 })
1011 class FakeComponent {
1012 name = input.required<string>()
1013
1014 query = injectQuery(() => ({
1015 queryKey: ['fake', this.name()],
1016 queryFn: () => this.name(),
1017 }))
1018 }
1019
1020 const name = signal('signal-input-required-test')
1021 const rendered = await render(FakeComponent, {

Callers

nothing calls this directly

Calls 2

injectQueryFunction · 0.85
ComponentFunction · 0.50

Tested by

no test coverage detected