2021-12-10 02:37:01 +00:00
|
|
|
/**
|
|
|
|
|
* @license
|
|
|
|
|
* Copyright Google LLC All Rights Reserved.
|
|
|
|
|
*
|
|
|
|
|
* Use of this source code is governed by an MIT-style license that can be
|
2024-09-20 15:23:15 +00:00
|
|
|
* found in the LICENSE file at https://angular.dev/license
|
2021-12-10 02:37:01 +00:00
|
|
|
*/
|
|
|
|
|
|
2021-12-09 05:44:17 +00:00
|
|
|
import {TestBed, waitForAsync} from '@angular/core/testing';
|
2023-03-14 20:31:54 +00:00
|
|
|
import {RouterModule} from '@angular/router';
|
2025-05-08 13:20:37 +00:00
|
|
|
import {ApplicationOperations} from '../../../ng-devtools';
|
2021-12-09 05:44:17 +00:00
|
|
|
|
|
|
|
|
import {AppComponent} from './app.component';
|
2020-01-27 18:40:18 +00:00
|
|
|
|
|
|
|
|
describe('AppComponent', () => {
|
2021-12-09 05:44:17 +00:00
|
|
|
beforeEach(waitForAsync(() => {
|
|
|
|
|
const applicationOperationsSPy = jasmine.createSpyObj('messageBus', ['viewSource']);
|
|
|
|
|
TestBed.configureTestingModule({
|
|
|
|
|
declarations: [AppComponent],
|
2023-03-14 20:31:54 +00:00
|
|
|
imports: [RouterModule.forRoot([])],
|
2021-12-09 05:44:17 +00:00
|
|
|
providers: [
|
|
|
|
|
{
|
|
|
|
|
provide: ApplicationOperations,
|
|
|
|
|
useClass: applicationOperationsSPy,
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
}).compileComponents();
|
|
|
|
|
}));
|
2020-01-27 18:40:18 +00:00
|
|
|
|
|
|
|
|
it('should create the app', () => {
|
|
|
|
|
const fixture = TestBed.createComponent(AppComponent);
|
|
|
|
|
const app = fixture.componentInstance;
|
|
|
|
|
expect(app).toBeTruthy();
|
|
|
|
|
});
|
|
|
|
|
});
|