Skip to content

Commit f95cee8

Browse files
committed
fix(test): fix jest tests
1 parent 775db9d commit f95cee8

File tree

7 files changed

+8
-90
lines changed

7 files changed

+8
-90
lines changed

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

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

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

1412
fixture = TestBed.createComponent(DemoComponent);
1513
component = fixture.componentInstance;

apps/playground-e2e/src/integration/app.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ describe('playground', () => {
88
cy.login('[email protected]', 'myPassword');
99

1010
// Function helper example, see `../support/app.po.ts` file
11-
getGreeting().contains('Welcome to playground!');
11+
getGreeting().contains('Hello Native Federation!');
1212
});
1313
});

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ describe('AppComponent', () => {
2525
fixture.detectChanges();
2626
const compiled = fixture.nativeElement;
2727
expect(compiled.querySelector('h1').textContent).toContain(
28-
'Welcome to playground!'
28+
'Hello Native Federation!'
2929
);
3030
});
3131
});

jest.preset.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,8 @@ module.exports = {
1212
* More info: https://jestjs.io/docs/upgrading-to-jest29#snapshot-format
1313
*/
1414
snapshotFormat: { escapeString: true, printBasicPrototype: true },
15+
// because of https://github.com/jestjs/jest/issues/4422
16+
globals: {
17+
Uint8Array: Uint8Array,
18+
},
1519
};

libs/mf/src/builders/build/builder.spec.ts

Lines changed: 0 additions & 42 deletions
This file was deleted.

libs/native-federation/src/builders/build/builder.spec.ts

Lines changed: 0 additions & 42 deletions
This file was deleted.

libs/native-federation/src/executors/build/executor.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const options: BuildExecutorSchema = {};
55

66
describe('Build Executor', () => {
77
it('can run', async () => {
8-
const output = await executor(options);
8+
const output = await executor(options, {});
99
expect(output.success).toBe(true);
1010
});
1111
});

0 commit comments

Comments
 (0)