Skip to content

Commit 53409eb

Browse files
committed
refactor: remove getFromTestBed
BREAKING CHANGE: The getFromTestBed function has been removed, use Angular's TestBed.get instead
1 parent f3ef4f7 commit 53409eb

File tree

4 files changed

+6
-28
lines changed

4 files changed

+6
-28
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,20 @@
22

33
Lightweight utility functions to test Angular components.
44

5-
[**Read The Docs**](https://testing-library.com/angular) | [Edit the docs](https://github.com/alexkrolick/testing-library-docs)
5+
[**Read The Docs**](https://testing-library.com/angular) | [Edit the docs](https://github.com/alexkrolick/testing-library-docs)
66

77
<hr />
88

99
[![Build status][build-badge]][build]
10+
1011
[![npm][npm-badge]][npm]
12+
1113
[![Semantically released][sr-badge]][sr]
14+
1215
[![Styled with prettier][prettier-badge]][prettier]
16+
1317
[![MIT License][license-badge]][license]
18+
1419
[![Code of Conduct][coc-badge]][coc]
1520

1621
## Table of Contents
@@ -23,7 +28,6 @@ Lightweight utility functions to test Angular components.
2328
- [`container: HTMLElement`](#container-htmlelement)
2429
- [`debug() => void`](#debug--void)
2530
- [`fixture: any`](#fixture-any)
26-
- [`getFromTestBed(token: any, notFoundValue?: any) => any`](#getfromtestbedtoken-any-notfoundvalue-any--any)
2731
- [Usage](#usage)
2832
- [LICENSE](#license)
2933

@@ -115,10 +119,6 @@ Prints out the container.
115119

116120
The Angular fixture.
117121

118-
#### `getFromTestBed(token: any, notFoundValue?: any) => any`
119-
120-
Calls the the Angular `TestBed.get` function.
121-
122122
## Usage
123123

124124
You can find some examples in the [tests folder](https://github.com/angular-extensions/testing-library/tree/master/projects/testing-library/tests).

projects/testing-library/src/lib/models.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { getQueriesForElement, FireObject } from 'dom-testing-library';
55
export interface RenderResult extends ReturnType<typeof getQueriesForElement>, FireObject {
66
container: HTMLElement;
77
debug: () => void;
8-
getFromTestBed: (token: any, notFoundValue?: any) => any;
98
fixture: ComponentFixture<any>;
109
}
1110

projects/testing-library/src/lib/testing-library.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ export async function createComponent<T>(
5454
return {
5555
fixture,
5656
container: fixture.nativeElement,
57-
getFromTestBed: TestBed.get,
5857
debug: () => console.log(prettyDOM(fixture.nativeElement)),
5958
...eventsWithDetectChanges,
6059
...getQueriesForElement(fixture.nativeElement),

projects/testing-library/tests/getFromTestBed.spec.ts

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)