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

Class FakeComponent

packages/angular-query/src/__tests__/inject-queries.test.ts:929–945  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

927
928 it('should support required signal inputs', async () => {
929 @Component({
930 selector: 'app-fake',
931 template: `{{ queries()[0].data() }}`,
932 changeDetection: ChangeDetectionStrategy.OnPush,
933 })
934 class FakeComponent {
935 name = input.required<string>()
936
937 queries = injectQueries(() => ({
938 queries: [
939 {
940 queryKey: ['fake', this.name()],
941 queryFn: () => this.name(),
942 },
943 ],
944 }))
945 }
946
947 const name = signal('signal-input-required-test')
948 const rendered = await render(FakeComponent, {

Callers

nothing calls this directly

Calls 2

injectQueriesFunction · 0.90
ComponentFunction · 0.50

Tested by

no test coverage detected