Skip to content

Commit 57949c0

Browse files
committed
fix: Fix tests in error
1 parent ef2d54e commit 57949c0

15 files changed

Lines changed: 25 additions & 9 deletions

File tree

apps/mfe1/src/app/app.component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { Component } from '@angular/core';
44
selector: 'angular-architects-root',
55
templateUrl: './app.component.html',
66
styleUrls: ['./app.component.css'],
7+
standalone: false,
78
})
89
export class AppComponent {
910
title = 'mfe1';

apps/mfe1/src/app/demo/demo.component.spec.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ describe('DemoComponent', () => {
77
let fixture: ComponentFixture<DemoComponent>;
88

99
beforeEach(async () => {
10-
await TestBed.configureTestingModule({}).compileComponents();
10+
await TestBed.configureTestingModule({
11+
imports: [DemoComponent],
12+
}).compileComponents();
1113

1214
fixture = TestBed.createComponent(DemoComponent);
1315
component = fixture.componentInstance;

apps/mfe1/src/app/nx-welcome.component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -842,6 +842,7 @@ nx affected:e2e</pre>
842842
`,
843843
styles: [],
844844
encapsulation: ViewEncapsulation.None,
845+
standalone: false,
845846
})
846847
export class NxWelcomeComponent implements OnInit {
847848
constructor() {}

apps/mfe1/src/test-setup.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
import 'jest-preset-angular/setup-jest';
1+
import { setupZoneTestEnv } from 'jest-preset-angular/setup-env/zone';
2+
setupZoneTestEnv();

apps/mfe2/src/app/app.component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { Component } from '@angular/core';
44
selector: 'angular-architects-root',
55
templateUrl: './app.component.html',
66
styleUrls: ['./app.component.css'],
7+
standalone: false,
78
})
89
export class AppComponent {
910
title = 'mfe2';

apps/mfe2/src/app/nx-welcome.component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -842,6 +842,7 @@ nx affected:e2e</pre>
842842
`,
843843
styles: [],
844844
encapsulation: ViewEncapsulation.None,
845+
standalone: false,
845846
})
846847
export class NxWelcomeComponent implements OnInit {
847848
constructor() {}

apps/mfe2/src/test-setup.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
import 'jest-preset-angular/setup-jest';
1+
import { setupZoneTestEnv } from 'jest-preset-angular/setup-env/zone';
2+
setupZoneTestEnv();

apps/playground/src/app/app.component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { Component, Type } from '@angular/core';
66
selector: 'angular-architects-root',
77
templateUrl: './app.component.html',
88
styleUrls: ['./app.component.css'],
9+
standalone: false,
910
})
1011
export class AppComponent {
1112
title = 'playground';

apps/playground/src/test-setup.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import 'jest-preset-angular/setup-jest';
1+
import { setupZoneTestEnv } from 'jest-preset-angular/setup-env/zone';
2+
setupZoneTestEnv();
23

34
import { getTestBed } from '@angular/core/testing';
45
import {

libs/mf-runtime/src/test-setup.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ globalThis.ngJest = {
55
errorOnUnknownProperties: true,
66
},
77
};
8-
import 'jest-preset-angular/setup-jest';
8+
import { setupZoneTestEnv } from 'jest-preset-angular/setup-env/zone';
9+
setupZoneTestEnv();

0 commit comments

Comments
 (0)