File tree Expand file tree Collapse file tree 3 files changed +41
-4
lines changed
packages/angular_devkit/build_angular/src/webpack/plugins/karma
tests/legacy-cli/e2e/tests/test Expand file tree Collapse file tree 3 files changed +41
-4
lines changed Original file line number Diff line number Diff line change 3030 // All served files with the latest timestamps
3131 % MAPPINGS %
3232 </ script >
33- < script src ="_karma_webpack_/runtime.js " crossorigin ="anonymous " type =" module " > </ script >
34- < script src ="_karma_webpack_/polyfills.js " crossorigin ="anonymous " type =" module " > </ script >
33+ < script src ="_karma_webpack_/runtime.js " crossorigin ="anonymous "> </ script >
34+ < script src ="_karma_webpack_/polyfills.js " crossorigin ="anonymous "> </ script >
3535 <!-- Dynamically replaced with <script> tags -->
3636 %SCRIPTS%
3737 < script src ="_karma_webpack_/scripts.js " crossorigin ="anonymous " defer > </ script >
Original file line number Diff line number Diff line change 3232 // All served files with the latest timestamps
3333 % MAPPINGS %
3434 </ script >
35- < script src ="_karma_webpack_/runtime.js " crossorigin ="anonymous " type =" module " > </ script >
36- < script src ="_karma_webpack_/polyfills.js " crossorigin ="anonymous " type =" module " > </ script >
35+ < script src ="_karma_webpack_/runtime.js " crossorigin ="anonymous "> </ script >
36+ < script src ="_karma_webpack_/polyfills.js " crossorigin ="anonymous "> </ script >
3737 <!-- Dynamically replaced with <script> tags -->
3838 %SCRIPTS%
3939 < script src ="_karma_webpack_/scripts.js " crossorigin ="anonymous " defer > </ script >
Original file line number Diff line number Diff line change 1+ import { ng } from '../../utils/process' ;
2+ import { writeFile } from '../../utils/fs' ;
3+
4+ export default async function ( ) {
5+ await writeFile (
6+ 'src/app/app.component.spec.ts' ,
7+ `
8+ import { TestBed } from '@angular/core/testing';
9+ import { RouterTestingModule } from '@angular/router/testing';
10+ import { AppComponent } from './app.component';
11+
12+ describe('AppComponent', () => {
13+ beforeAll(() => {
14+ jasmine.clock().install();
15+ });
16+
17+ afterAll(() => {
18+ jasmine.clock().uninstall();
19+ });
20+
21+ beforeEach(async () => {
22+ await TestBed.configureTestingModule({
23+ imports: [RouterTestingModule],
24+ declarations: [AppComponent],
25+ }).compileComponents();
26+ });
27+
28+ it('should create the app', () => {
29+ const fixture = TestBed.createComponent(AppComponent);
30+ expect(fixture.componentInstance).toBeTruthy();
31+ });
32+ });
33+ ` ,
34+ ) ;
35+
36+ await ng ( 'test' , '--watch=false' ) ;
37+ }
You can’t perform that action at this time.
0 commit comments