test(core): enable previously failing @defer tests (#51965)

This commit re-enables previously flaky tests. The original issue was resolved by mocking `requestIdleCallback` in tests.

PR Close #51965
This commit is contained in:
Andrew Kushnir 2023-09-29 17:33:57 -07:00 committed by Alex Rickabaugh
parent e368d81896
commit 367b075d15

View file

@ -901,8 +901,7 @@ describe('@defer', () => {
expect(fixture.nativeElement.outerHTML).toContain('Rendering primary block');
});
// TODO(akushnir): investigate why this test is flaky, fix and re-enable.
xit('should support `prefetch on idle` condition', async () => {
it('should support `prefetch on idle` condition', async () => {
@Component({
selector: 'nested-cmp',
standalone: true,
@ -982,8 +981,7 @@ describe('@defer', () => {
expect(loadingFnInvokedTimes).toBe(1);
});
// TODO(akushnir): investigate why this test is flaky, fix and re-enable.
xit('should trigger prefetching based on `on idle` only once', async () => {
it('should trigger prefetching based on `on idle` only once', async () => {
@Component({
selector: 'nested-cmp',
standalone: true,
@ -1067,8 +1065,7 @@ describe('@defer', () => {
expect(loadingFnInvokedTimes).toBe(1);
});
// TODO(akushnir): investigate why this test is flaky, fix and re-enable.
xit('should trigger fetching based on `on idle` only once', async () => {
it('should trigger fetching based on `on idle` only once', async () => {
@Component({
selector: 'nested-cmp',
standalone: true,