Skip to content

Commit f2f7df6

Browse files
authored
test(e2e): add full Ivy lib test (#1176)
1 parent 4a07eac commit f2f7df6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+700
-339
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ e2e/**/.yarn/*
1717
!e2e/**/.yarn/releases
1818
!e2e/**/.yarn/sdks
1919
!e2e/**/.yarn/versions
20-
!/e2e/ng-lib-import/node_modules
20+
!/e2e/full-ivy-lib/node_modules
21+
!/e2e/partial-ivy-lib/node_modules
2122
!/e2e/process-js-packages/node_modules
2223
src/transformers/downlevel_decorators_transform
2324
src/ngtsc

e2e/__tests__/ng-lib-import.test.ts renamed to e2e/__tests__/full-ivy-lib.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { jsonNoCache as runWithJsonNoCache } from '../run-jest';
22

3-
const DIR = 'ng-lib-import';
3+
const DIR = 'full-ivy-lib';
44

55
test(`successfully runs the tests inside ${DIR} with isolatedModules: false`, () => {
66
const { json } = runWithJsonNoCache(DIR);
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { jsonNoCache as runWithJsonNoCache } from '../run-jest';
2+
3+
const DIR = 'partial-ivy-lib';
4+
5+
test(`successfully runs the tests inside ${DIR} with isolatedModules: false`, () => {
6+
const { json } = runWithJsonNoCache(DIR);
7+
8+
expect(json.success).toBe(true);
9+
});
10+
11+
test(`successfully runs the tests inside ${DIR} with isolatedModules: true`, () => {
12+
const { json } = runWithJsonNoCache(DIR, ['-c=jest-isolated.config.js']);
13+
14+
expect(json.success).toBe(true);
15+
});
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import { TestBed, waitForAsync } from '@angular/core/testing';
2+
import { FullIvyService, FullIvyComponent, FullIvyModule } from 'full-ivy';
3+
4+
describe('Full Ivy library', () => {
5+
let fullIvyComponent: FullIvyComponent;
6+
let fullIvyService: FullIvyService;
7+
8+
beforeEach(
9+
waitForAsync(() => {
10+
TestBed.configureTestingModule({
11+
imports: [FullIvyModule],
12+
});
13+
14+
fullIvyComponent = TestBed.createComponent(FullIvyComponent).componentInstance;
15+
fullIvyService = TestBed.inject(FullIvyService);
16+
}),
17+
);
18+
19+
test('should create the component instance', () => {
20+
expect(fullIvyComponent).toBeDefined();
21+
});
22+
23+
test('should create the service instance', () => {
24+
expect(fullIvyService).toBeDefined();
25+
});
26+
});
File renamed without changes.

e2e/full-ivy-lib/node_modules/full-ivy/README.md

Lines changed: 24 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

e2e/full-ivy-lib/node_modules/full-ivy/esm2020/full-ivy.mjs

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

e2e/full-ivy-lib/node_modules/full-ivy/esm2020/lib/full-ivy.component.mjs

Lines changed: 26 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

e2e/full-ivy-lib/node_modules/full-ivy/esm2020/lib/full-ivy.module.mjs

Lines changed: 22 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)