Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,10 @@
*/

import { getTestBed } from '@angular/core/testing';
import { platformBrowser } from '@angular/platform-browser';
import { BrowserTestingModule } from '@angular/platform-browser/testing';
import { BrowserTestingModule, platformBrowserTesting } from '@angular/platform-browser/testing';

// TODO(alanagius): replace with `platformBrowserTesting` once https://github.com/angular/angular/pull/60480 is released.
// Initialize the Angular testing environment.
getTestBed().initTestEnvironment(BrowserTestingModule, platformBrowser(), {
getTestBed().initTestEnvironment(BrowserTestingModule, platformBrowserTesting(), {
errorOnUnknownElements: true,
errorOnUnknownProperties: true,
});
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,9 @@
// `@angular-devkit/build-angular` rather than the user's workspace. Should look into virtual modules to support those use cases.

import { getTestBed } from '@angular/core/testing';
import { platformBrowser } from '@angular/platform-browser';
import { BrowserTestingModule } from '@angular/platform-browser/testing';
import { BrowserTestingModule, platformBrowserTesting } from '@angular/platform-browser/testing';

// TODO(alanagius): replace with `platformBrowserTesting` once https://github.com/angular/angular/pull/60480 is released.
getTestBed().initTestEnvironment(BrowserTestingModule, platformBrowser(), {
getTestBed().initTestEnvironment(BrowserTestingModule, platformBrowserTesting(), {
errorOnUnknownElements: true,
errorOnUnknownProperties: true,
});
Original file line number Diff line number Diff line change
Expand Up @@ -153,12 +153,10 @@ function getBuiltInMainFile(): string {
const content = Buffer.from(
`
import { getTestBed } from '@angular/core/testing';
import { platformBrowser } from '@angular/platform-browser';
import { BrowserTestingModule, platformBrowserTesting } from '@angular/platform-browser/testing';

// TODO(alanagius): replace with \`platformBrowserTesting\` once https://github.com/angular/angular/pull/60480 is released.
// Initialize the Angular testing environment.
getTestBed().initTestEnvironment(BrowserTestingModule, platformBrowser(), {
getTestBed().initTestEnvironment(BrowserTestingModule, platformBrowserTesting(), {
errorOnUnknownElements: true,
errorOnUnknownProperties: true
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
*/

import { getTestBed } from '@angular/core/testing';
import { platformBrowser } from '@angular/platform-browser';
import { BrowserTestingModule } from '@angular/platform-browser/testing';
import { BrowserTestingModule, platformBrowserTesting } from '@angular/platform-browser/testing';
import {
getConfig,
sessionFailed,
Expand Down Expand Up @@ -65,8 +64,7 @@ export async function runJasmineTests(jasmineEnv) {
jasmine.DEFAULT_TIMEOUT_INTERVAL = config.defaultTimeoutInterval;

// Initialize `TestBed` automatically for users. This assumes we already evaluated `zone.js/testing`.
// TODO(alanagius): replace with `platformBrowserTesting` once https://github.com/angular/angular/pull/60480 is released.
getTestBed().initTestEnvironment(BrowserTestingModule, platformBrowser(), {
getTestBed().initTestEnvironment(BrowserTestingModule, platformBrowserTesting(), {
errorOnUnknownElements: true,
errorOnUnknownProperties: true,
});
Expand Down