How to use the @angular/upgrade/static/testing.createAngularJSTestingModule function in @angular/upgrade

To help you get started, we’ve selected a few @angular/upgrade examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github angular / angular / packages / examples / upgrade / static / ts / full / module.spec.ts View on Github external
describe('HeroesService (from AngularJS)', () => {
  // #docregion angularjs-setup
  beforeEach(module(createAngularJSTestingModule([Ng2AppModule])));
  beforeEach(module(ng1AppModule.name));
  // #enddocregion angularjs-setup

  // #docregion angularjs-spec
  it('should have access to the HeroesService',
     inject((heroesService: HeroesService) => { expect(heroesService).toBeDefined(); }));
  // #enddocregion angularjs-spec
});