Skip to content

Commit 36832bb

Browse files
committed
resolve errors
1 parent 273442f commit 36832bb

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

projects/testing-library/src/lib/testing-library.ts

+3
Original file line numberDiff line numberDiff line change
@@ -499,6 +499,9 @@ function addAutoDeclarations<SutType>(
499499
) {
500500
const nonStandaloneDeclarations = declarations?.filter((d) => !isStandalone(d));
501501
if (typeof sut === 'string') {
502+
if (wrapper && isStandalone(wrapper)) {
503+
return nonStandaloneDeclarations;
504+
}
502505
return [...nonStandaloneDeclarations, wrapper];
503506
}
504507

projects/testing-library/tests/config.spec.ts

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import { ReactiveFormsModule, FormBuilder } from '@angular/forms';
1313
</div>
1414
</form>
1515
`,
16+
standalone: false,
1617
})
1718
class FormsComponent {
1819
form = this.formBuilder.group({

projects/testing-library/tests/issues/issue-230.spec.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
import { Component } from '@angular/core';
22
import { render, waitFor, screen } from '../../src/public_api';
3+
import { NgClass } from '@angular/common';
34

45
@Component({
56
template: ` <button [ngClass]="classes">Load</button> `,
7+
imports: [NgClass],
68
})
79
class LoopComponent {
810
get classes() {
@@ -17,7 +19,7 @@ test('wait does not end up in a loop', async () => {
1719

1820
await expect(
1921
waitFor(() => {
20-
expect(true).toEqual(false);
22+
expect(true).toBe(false);
2123
}),
2224
).rejects.toThrow();
2325
});

0 commit comments

Comments
 (0)