mirror of
https://github.com/angular/angular.git
synced 2026-12-06 05:09:14 -05:00
Updates AIO to the latest v13 release-candidate version of all Angular-owned packages, such as Angular CDK and Angular Material. Applies changes needed for the v13 CLI as performed by the CLI through `ng update`: https://github.com/angular/angular-cli/tree/7ff8c5350ea2e49574dd659adae02215957d2685/packages/schematics/angular/migrations/update-13. Additionally, the web components polyfill has been removed as all browsers supported by Angular seem to support custom elements v1 natively, according to: * https://caniuse.com/custom-elementsv1 * https://www.webcomponents.org/ (scroll down to browser support) Co-authored-by: George Kalpakas <[email protected]> PR Close #44030
34 lines
1.1 KiB
TypeScript
34 lines
1.1 KiB
TypeScript
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
|
|
|
|
import 'zone.js/testing';
|
|
import { getTestBed } from '@angular/core/testing';
|
|
import {
|
|
BrowserDynamicTestingModule,
|
|
platformBrowserDynamicTesting
|
|
} from '@angular/platform-browser-dynamic/testing';
|
|
|
|
// Needed for `assert` polyfill uses `process`.
|
|
// See: https://github.com/browserify/commonjs-assert/blob/bba838e9ba9e28edf3127ce6974624208502f6bc/internal/assert/assertion_error.js#L138
|
|
// The `assert` polyfill is needed because of `timezone-mock` which is a Node.JS library but in being used in Browser.
|
|
(globalThis as any).process = {
|
|
env: {},
|
|
};
|
|
|
|
declare const require: {
|
|
context(path: string, deep?: boolean, filter?: RegExp): {
|
|
keys(): string[];
|
|
<T>(id: string): T;
|
|
};
|
|
};
|
|
|
|
// First, initialize the Angular testing environment.
|
|
getTestBed().initTestEnvironment(
|
|
BrowserDynamicTestingModule,
|
|
platformBrowserDynamicTesting(),
|
|
);
|
|
|
|
// Then we find all the tests.
|
|
const context = require.context('./', true, /\.spec\.ts$/);
|
|
// And load the modules.
|
|
context.keys().map(context);
|