Skip to content
This repository was archived by the owner on Dec 18, 2024. It is now read-only.

Commit b96975f

Browse files
authored
refactor: update stackblitz boilerplate to setup test environment (#1096)
* refactor: update stackblitz boilerplate to setup test environment We removed the test environment calls from the harness example spec files so that the standard CLI `test.ts` file can initialize the test browser environment. This commit updates the SHA of the docs content and re-adds the `test.ts` init environment logic. angular/components@88b718e * fixup! refactor: update stackblitz boilerplate to setup test environment feedback
1 parent 4ceb52d commit b96975f

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

src/assets/stack-blitz/src/test.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
22

33
import 'zone.js/testing';
4+
import {getTestBed} from '@angular/core/testing';
5+
import {
6+
BrowserDynamicTestingModule,
7+
platformBrowserDynamicTesting
8+
} from '@angular/platform-browser-dynamic/testing';
49

510
declare const require: {
611
context(path: string, deep?: boolean, filter?: RegExp): {
@@ -10,11 +15,10 @@ declare const require: {
1015
};
1116

1217
// First, initialize the Angular testing environment.
13-
// TODO: Re-enable this once example test specs no longer init the test environment manually.
14-
/*getTestBed().initTestEnvironment(
18+
getTestBed().initTestEnvironment(
1519
BrowserDynamicTestingModule,
1620
platformBrowserDynamicTesting()
17-
);*/
21+
);
1822

1923
// Then we find all the tests.
2024
const context = require.context('./', true, /\.spec\.ts$/);

yarn.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,8 +258,8 @@
258258
tslib "^2.3.0"
259259

260260
"@angular/components-examples@angular/material2-docs-content#13.0.x":
261-
version "13.0.0-rc.1"
262-
resolved "https://codeload.github.com/angular/material2-docs-content/tar.gz/93a973a9b7dc616626b408f980228ce9849fce93"
261+
version "13.0.0-rc.2"
262+
resolved "https://codeload.github.com/angular/material2-docs-content/tar.gz/383365b878d35fe59c5efa24fa25cba516f7d82a"
263263
dependencies:
264264
tslib "^2.3.0"
265265

0 commit comments

Comments
 (0)