diff --git a/aio/content/guide/testing.md b/aio/content/guide/testing.md
index a7518dcc3a..7b26a14fee 100644
--- a/aio/content/guide/testing.md
+++ b/aio/content/guide/testing.md
@@ -6,8 +6,8 @@ This guide offers tips and techniques for unit and integration testing Angular a
The guide presents tests of a sample CLI application that is much like the [_Tour of Heroes_ tutorial](tutorial).
The sample application and all tests in this guide are available for inspection and experimentation:
-* Sample app
-* Tests
+- Sample app
+- Tests
@@ -137,7 +137,7 @@ Angular testing utilities make it easy to investigate how injected services beha
#### Testing services with the _TestBed_
-Your app relies on Angular [dependency injection (DI)](guide/dependency-injection)
+Your app relies on Angular [dependency injection (DI)](guide/dependency-injection)
to create services.
When a service has a dependent service, DI finds or creates that dependent service.
And if that dependent service has its own dependencies, DI finds-or-creates them as well.
@@ -153,7 +153,7 @@ when you use the `TestBed` testing utility to provide and create services.
#### Angular _TestBed_
-The `TestBed` is the most important of the Angular testing utilities.
+The `TestBed` is the most important of the Angular testing utilities.
The `TestBed` creates a dynamically-constructed Angular _test_ module that emulates
an Angular [@NgModule](guide/ngmodules).
@@ -162,23 +162,23 @@ The `TestBed.configureTestingModule()` method takes a metadata object that can h
To test a service, you set the `providers` metadata property with an
array of the services that you'll test or mock.
-
Then inject it inside a test by calling `TestBed.get()` with the service class as the argument.
-
Or inside the `beforeEach()` if you prefer to inject the service as part of your setup.
-
@@ -186,15 +186,15 @@ When testing a service with a dependency, provide the mock in the `providers` ar
In the following example, the mock is a spy object.
-
The test consumes that spy in the same way it did earlier.
-
@@ -210,51 +210,51 @@ Here's how you might rewrite one of the `MasterService` tests in that style.
Begin by putting re-usable, preparatory code in a _setup_ function instead of `beforeEach()`.
-
-The `setup()` function returns an object literal
+The `setup()` function returns an object literal
with the variables, such as `masterService`, that a test might reference.
-You don't define _semi-global_ variables (e.g., `let masterService: MasterService`)
+You don't define _semi-global_ variables (e.g., `let masterService: MasterService`)
in the body of the `describe()`.
Then each test invokes `setup()` in its first line, before continuing
with steps that manipulate the test subject and assert expectations.
-
-Notice how the test uses
-[_destructuring assignment_](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment)
+Notice how the test uses
+[_destructuring assignment_](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment)
to extract the setup variables that it needs.
-
Many developers feel this approach is cleaner and more explicit than the
traditional `beforeEach()` style.
-Although this testing guide follows the tradition style and
-the default [CLI schematics](https://github.com/angular/devkit)
+Although this testing guide follows the tradition style and
+the default [CLI schematics](https://github.com/angular/devkit)
generate test files with `beforeEach()` and `TestBed`,
feel free to adopt _this alternative approach_ in your own projects.
#### Testing HTTP services
-Data services that make HTTP calls to remote servers typically inject and delegate
+Data services that make HTTP calls to remote servers typically inject and delegate
to the Angular [`HttpClient`](guide/http) service for XHR calls.
You can test a data service with an injected `HttpClient` spy as you would
test any service with a dependency.
-
@@ -266,7 +266,7 @@ _subscribe_ to an observable to (a) cause it to execute and (b)
assert that the method succeeds or fails.
The `subscribe()` method takes a success (`next`) and fail (`error`) callback.
-Make sure you provide _both_ callbacks so that you capture errors.
+Make sure you provide _both_ callbacks so that you capture errors.
Neglecting to do so produces an asynchronous uncaught observable error that
the test runner will likely attribute to a completely different test.
@@ -314,9 +314,9 @@ Test a component class on its own as you would test a service class.
Consider this `LightswitchComponent` which toggles a light on and off
(represented by an on-screen message) when the user clicks the button.
-
@@ -328,17 +328,17 @@ To test a service with no dependencies, you create it with `new`, poke at its AP
and assert expectations on its public state.
Do the same with the component class.
-
Here is the `DashboardHeroComponent` from the _Tour of Heroes_ tutorial.
-
@@ -349,9 +349,9 @@ listens for an event raised through the _selected_ `@Output` property.
You can test that the class code works without creating the `DashboardHeroComponent`
or its parent component.
-
@@ -360,33 +360,33 @@ create the component and its dependencies.
The following `WelcomeComponent` depends on the `UserService` to know the name of the user to greet.
-
You might start by creating a mock of the `UserService` that meets the minimum needs of this component.
-
Then provide and inject _both the_ **component** _and the service_ in the `TestBed` configuration.
-
Then exercise the component class, remembering to call the [lifecycle hook methods](guide/lifecycle-hooks) as Angular does when running the app.
-
@@ -403,11 +403,11 @@ respond to user input and gestures, or integrate with its parent and child compo
None of the _class-only_ tests above can answer key questions about how the
components actually behave on screen.
-* Is `Lightswitch.clicked()` bound to anything such that the user can invoke it?
-* Is the `Lightswitch.message` displayed?
-* Can the user actually select the hero displayed by `DashboardHeroComponent`?
-* Is the hero name displayed as expected (i.e, in uppercase)?
-* Is the welcome message displayed by the template of `WelcomeComponent`?
+- Is `Lightswitch.clicked()` bound to anything such that the user can invoke it?
+- Is the `Lightswitch.message` displayed?
+- Can the user actually select the hero displayed by `DashboardHeroComponent`?
+- Is the hero name displayed as expected (i.e, in uppercase)?
+- Is the welcome message displayed by the template of `WelcomeComponent`?
These may not be troubling questions for the simple components illustrated above.
But many components have complex interactions with the DOM elements
@@ -436,7 +436,7 @@ ng generate component banner --inline-template --inline-style --module app
It also generates an initial test file for the component, `banner-external.component.spec.ts`, that looks like this:
-
@@ -452,16 +452,16 @@ The rest of the file is boilerplate setup code anticipating more advanced tests
You'll learn about these advanced test features below.
For now, you can radically reduce this test file to a more manageable size:
-
-In this example, the metadata object passed to `TestBed.configureTestingModule`
+In this example, the metadata object passed to `TestBed.configureTestingModule`
simply declares `BannerComponent`, the component to test.
-
@@ -469,7 +469,7 @@ simply declares `BannerComponent`, the component to test.
There's no need to declare or import anything else.
-The default test module is pre-configured with
+The default test module is pre-configured with
something like the `BrowserModule` from `@angular/platform-browser`.
Later you'll call `TestBed.configureTestingModule()` with
@@ -484,12 +484,12 @@ Optional `override` methods can further fine-tune aspects of the configuration.
After configuring `TestBed`, you call its `createComponent()` method.
-
-`TestBed.createComponent()` creates an instance of the `BannerComponent`,
+`TestBed.createComponent()` creates an instance of the `BannerComponent`,
adds a corresponding element to the test-runner DOM,
and returns a [`ComponentFixture`](#component-fixture).
@@ -497,7 +497,7 @@ and returns a [`ComponentFixture`](#component-fixture).
Do not re-configure `TestBed` after calling `createComponent`.
-The `createComponent` method freezes the current `TestBed`definition,
+The `createComponent` method freezes the current `TestBed`definition,
closing it to further configuration.
You cannot call any more `TestBed` configuration methods, not `configureTestingModule()`,
@@ -514,7 +514,7 @@ The [ComponentFixture](api/core/testing/ComponentFixture) is a test harness for
Access the component instance through the fixture and confirm it exists with a Jasmine expectation:
-
@@ -525,16 +525,16 @@ You will add more tests as this component evolves.
Rather than duplicate the `TestBed` configuration for each test,
you refactor to pull the setup into a Jasmine `beforeEach()` and some supporting variables:
-
-Now add a test that gets the component's element from `fixture.nativeElement` and
+Now add a test that gets the component's element from `fixture.nativeElement` and
looks for the expected text.
-
@@ -546,22 +546,22 @@ looks for the expected text.
The value of `ComponentFixture.nativeElement` has the `any` type.
Later you'll encounter the `DebugElement.nativeElement` and it too has the `any` type.
-Angular can't know at compile time what kind of HTML element the `nativeElement` is or
+Angular can't know at compile time what kind of HTML element the `nativeElement` is or
if it even is an HTML element.
The app might be running on a _non-browser platform_, such as the server or a
[Web Worker](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API),
where the element may have a diminished API or not exist at all.
The tests in this guide are designed to run in a browser so a
-`nativeElement` value will always be an `HTMLElement` or
-one of its derived classes.
+`nativeElement` value will always be an `HTMLElement` or
+one of its derived classes.
Knowing that it is an `HTMLElement` of some sort, you can use
the standard HTML `querySelector` to dive deeper into the element tree.
Here's another test that calls `HTMLElement.querySelector` to get the paragraph element and look for the banner text:
-
@@ -572,14 +572,14 @@ Here's another test that calls `HTMLElement.querySelector` to get the paragraph
The Angular _fixture_ provides the component's element directly through the `fixture.nativeElement`.
-
This is actually a convenience method, implemented as `fixture.debugElement.nativeElement`.
-
@@ -587,7 +587,7 @@ This is actually a convenience method, implemented as `fixture.debugElement.nati
There's a good reason for this circuitous path to the element.
The properties of the `nativeElement` depend upon the runtime environment.
-You could be running these tests on a _non-browser_ platform that doesn't have a DOM or
+You could be running these tests on a _non-browser_ platform that doesn't have a DOM or
whose DOM-emulation doesn't support the full `HTMLElement` API.
Angular relies on the `DebugElement` abstraction to work safely across _all supported platforms_.
@@ -600,7 +600,7 @@ whose familiar methods and properties you can explore within a test.
Here's the previous test, re-implemented with `fixture.debugElement.nativeElement`:
-
@@ -610,7 +610,7 @@ are useful in tests, as you'll see elsewhere in this guide.
You import the `DebugElement` symbol from the Angular core library.
-
@@ -625,12 +625,12 @@ For example, the component might render first on the server as part of a strateg
If it doesn't support `querySelector`, the previous test could fail.
The `DebugElement` offers query methods that work for all supported platforms.
-These query methods take a _predicate_ function that returns `true` when a node in the `DebugElement` tree matches the selection criteria.
+These query methods take a _predicate_ function that returns `true` when a node in the `DebugElement` tree matches the selection criteria.
You create a _predicate_ with the help of a `By` class imported from a
library for the runtime platform. Here's the `By` import for the browser platform:
-
@@ -638,22 +638,22 @@ library for the runtime platform. Here's the `By` import for the browser platfor
The following example re-implements the previous test with
`DebugElement.query()` and the browser's `By.css` method.
-
Some noteworthy observations:
-* The `By.css()` static method selects `DebugElement` nodes
-with a [standard CSS selector](https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Getting_started/Selectors "CSS selectors").
-* The query returns a `DebugElement` for the paragraph.
-* You must unwrap that result to get the paragraph element.
+- The `By.css()` static method selects `DebugElement` nodes
+ with a [standard CSS selector](https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Getting_started/Selectors 'CSS selectors').
+- The query returns a `DebugElement` for the paragraph.
+- You must unwrap that result to get the paragraph element.
When you're filtering by CSS selector and only testing properties of a browser's _native element_, the `By.css` approach may be overkill.
-It's often easier and more clear to filter with a standard `HTMLElement` method
-such as `querySelector()` or `querySelectorAll()`,
+It's often easier and more clear to filter with a standard `HTMLElement` method
+such as `querySelector()` or `querySelectorAll()`,
as you'll see in the next set of tests.
@@ -670,13 +670,13 @@ The current `BannerComponent` presents static title text in the HTML template.
After a few changes, the `BannerComponent` presents a dynamic title by binding to
the component's `title` property like this.
-
-Simple as this is, you decide to add a test to confirm that component
+Simple as this is, you decide to add a test to confirm that component
actually displays the right content where you think it should.
#### Query for the _<h1>_
@@ -687,9 +687,9 @@ that wraps the _title_ property interpolation binding.
You update the `beforeEach` to find that element with a standard HTML `querySelector`
and assign it to the `h1` variable.
-
@@ -700,12 +700,13 @@ and assign it to the `h1` variable.
For your first test you'd like to see that the screen displays the default `title`.
Your instinct is to write a test that immediately inspects the `