mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
|
|
||
|---|---|---|
| .. | ||
| BUILD.bazel | ||
| index.ts | ||
| README.md | ||
| test_bed_get_migration.ts | ||
Remove TestBed.get migration
Replaces the usages of the deprecated TestBed.get method with the non-deprecated TestBed.inject:
Before
import { TestBed } from '@angular/core/testing';
describe('test', () => {
it('should inject', () => {
console.log(TestBed.get(SOME_TOKEN));
});
});
After
import { TestBed } from '@angular/core/testing';
describe('test', () => {
it('should inject', () => {
console.log(TestBed.inject(SOME_TOKEN));
});
});