Skip to content

Commit e8ddcf4

Browse files
docs: add test case for #493 (#496)
1 parent 2cfca82 commit e8ddcf4

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed
+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import { HttpClient, provideHttpClient } from '@angular/common/http';
2+
import { provideHttpClientTesting } from '@angular/common/http/testing';
3+
import { Component, input } from '@angular/core';
4+
import { render, screen } from '../../src/public_api';
5+
6+
test('succeeds', async () => {
7+
await render(DummyComponent, {
8+
inputs: {
9+
value: 'test',
10+
},
11+
providers: [provideHttpClientTesting(), provideHttpClient()],
12+
});
13+
14+
expect(screen.getByText('test')).toBeVisible();
15+
});
16+
17+
@Component({
18+
selector: 'atl-dummy',
19+
standalone: true,
20+
imports: [],
21+
template: '<p>{{ value() }}</p>',
22+
})
23+
class DummyComponent {
24+
value = input.required<string>();
25+
// @ts-ignore
26+
constructor(private http: HttpClient) {}
27+
}

0 commit comments

Comments
 (0)