mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00: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`:
7ff8c5350e/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 <kalpakas.g@gmail.com>
PR Close #43583
33 lines
1.1 KiB
TypeScript
33 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);
|