Skip to content

Commit 30bff7b

Browse files
test: reproduce #422 (#423)
Closes #422
1 parent d5486f1 commit 30bff7b

File tree

3 files changed

+47
-11
lines changed

3 files changed

+47
-11
lines changed

package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@
2828
"prepare": "git config core.hookspath .githooks"
2929
},
3030
"dependencies": {
31-
"@angular/animations": "17.0.2",
31+
"@angular/animations": "17.0.3",
3232
"@angular/cdk": "17.0.0",
33-
"@angular/common": "17.0.2",
34-
"@angular/compiler": "17.0.2",
35-
"@angular/core": "17.0.2",
33+
"@angular/common": "17.0.3",
34+
"@angular/compiler": "17.0.3",
35+
"@angular/core": "17.0.3",
3636
"@angular/material": "17.0.0",
37-
"@angular/platform-browser": "17.0.2",
38-
"@angular/platform-browser-dynamic": "17.0.2",
39-
"@angular/router": "17.0.2",
37+
"@angular/platform-browser": "17.0.3",
38+
"@angular/platform-browser-dynamic": "17.0.3",
39+
"@angular/router": "17.0.3",
4040
"@ngrx/store": "17.0.0-rc.0",
4141
"@nx/angular": "17.1.1",
4242
"@testing-library/dom": "^9.0.0",
@@ -54,9 +54,9 @@
5454
"@angular-eslint/schematics": "17.0.1",
5555
"@angular-eslint/template-parser": "17.0.1",
5656
"@angular/cli": "~17.0.0",
57-
"@angular/compiler-cli": "17.0.2",
58-
"@angular/forms": "17.0.2",
59-
"@angular/language-service": "17.0.2",
57+
"@angular/compiler-cli": "17.0.3",
58+
"@angular/forms": "17.0.3",
59+
"@angular/language-service": "17.0.3",
6060
"@nx/eslint-plugin": "17.1.1",
6161
"@nx/jest": "17.1.1",
6262
"@nx/node": "17.1.1",

projects/testing-library/.eslintrc.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,15 @@
55
{
66
"files": ["*.ts"],
77
"rules": {
8-
"@typescript-eslint/ban-ts-comment": "off"
8+
"@typescript-eslint/ban-ts-comment": "off",
9+
"@typescript-eslint/no-unused-vars": [
10+
"error",
11+
{
12+
"argsIgnorePattern": "^_",
13+
"varsIgnorePattern": "^_",
14+
"caughtErrorsIgnorePattern": "^_"
15+
}
16+
]
917
}
1018
},
1119
{
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import { Component, ElementRef } from '@angular/core';
2+
import { NgIf } from '@angular/common';
3+
import { render } from '../../src/public_api';
4+
5+
test('declaration specific dependencies should be available for components', async () => {
6+
@Component({
7+
selector: 'atl-test',
8+
standalone: true,
9+
template: `<div>Test</div>`,
10+
})
11+
class TestComponent {
12+
constructor(_elementRef: ElementRef) {}
13+
}
14+
15+
await expect(async () => await render(TestComponent)).not.toThrow();
16+
});
17+
18+
test('standalone directives imported in standalone components', async () => {
19+
@Component({
20+
selector: 'atl-test',
21+
standalone: true,
22+
imports: [NgIf],
23+
template: `<div *ngIf="true">Test</div>`,
24+
})
25+
class TestComponent {}
26+
27+
await render(TestComponent);
28+
});

0 commit comments

Comments
 (0)