Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions projects/testing-library/tests/issues/issue-493.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { HttpClient, provideHttpClient } from '@angular/common/http';
import { provideHttpClientTesting } from '@angular/common/http/testing';
import { Component, input } from '@angular/core';
import { render, screen } from '../../src/public_api';

test('succeeds', async () => {
await render(DummyComponent, {
inputs: {
value: 'test',
},
providers: [provideHttpClientTesting(), provideHttpClient()],
});

expect(screen.getByText('test')).toBeVisible();
});

@Component({
selector: 'atl-dummy',
standalone: true,
imports: [],
template: '<p>{{ value() }}</p>',
})
class DummyComponent {
value = input.required<string>();
// @ts-ignore
constructor(private http: HttpClient) {}
}