Skip to content

Commit b44ca84

Browse files
committed
ngtest: update comments.
1 parent 7900d69 commit b44ca84

File tree

3 files changed

+7
-11
lines changed

3 files changed

+7
-11
lines changed

ngtest/lib/src/frontend/bed.dart

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Future<void> disposeAnyRunningTest() async {
6060
///
6161
/// test('should render "Hello World" in all-caps', () async {
6262
/// bed = bed.addProviders(const [
63-
/// const Provider(TextFormatter, useClass: AllCapsTextFormatter),
63+
/// const ClassProvider(TextFormatter, AllCapsTextFormatter),
6464
/// ]);
6565
/// fixture = await bed.create();
6666
/// expect(fixture.text, contains('HELLO WORLD'));
@@ -106,19 +106,12 @@ class NgTestBed<T extends Object> {
106106

107107
/// Create a new [NgTestBed] that uses the provided [component] factory.
108108
///
109-
/// Some APIs are not supported outside of [NgTestBed.useInitReflector]:
110-
///
111-
/// * [addProviders] will throw [UnsupportedError]; instead, the [addInjector]
112-
/// API allows you to wrap the previous [Injector], if any, to provide
113-
/// additional services. In most cases just [rootInjector] is enough, and
114-
/// you could re-use providers via [GenerateInjector].
115-
///
116109
/// ```dart
117110
/// void main() {
118111
/// final ngTestBed = NgTestBed(
119112
/// SomeComponentNgFactory,
120-
/// rootInjector: ([parent]) => new Injector.map({
121-
/// Service: new Service(),
113+
/// rootInjector: ([parent]) => Injector.map({
114+
/// Service: Service(),
122115
/// }, parent),
123116
/// );
124117
/// }

ngtest/lib/src/frontend/ng_zone/fake_time_stabilizer.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
/// @docImport 'real_time_stabilizer.dart';
2+
library;
3+
14
import 'dart:async';
25

36
import 'package:collection/collection.dart';

ngtest/lib/src/frontend/stabilizer.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ NgTestStabilizerFactory composeStabilizers(
4646
/// button.click();
4747
/// expect(button.text, 'No');
4848
/// }
49-
/// ```dart
49+
/// ```
5050
///
5151
/// In the case of Angular, and of other DOM-related libraries, however, the
5252
/// changes are not always applied immediately (synchronously). Instead, we need

0 commit comments

Comments
 (0)