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

refactor: update stackblitz boilerplate to setup test environment #1096

Merged
merged 2 commits into from
Nov 2, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
9 changes: 7 additions & 2 deletions src/assets/stack-blitz/src/test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
// 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';

declare const require: {
context(path: string, deep?: boolean, filter?: RegExp): {
Expand All @@ -11,10 +16,10 @@ declare const require: {

// First, initialize the Angular testing environment.
// TODO: Re-enable this once example test specs no longer init the test environment manually.
/*getTestBed().initTestEnvironment(
getTestBed().initTestEnvironment(
BrowserDynamicTestingModule,
platformBrowserDynamicTesting()
);*/
);

// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
Expand Down
4 changes: 2 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,8 @@
tslib "^2.3.0"

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

Expand Down