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

docs(testing): refer to 'lite-server' instead of 'live-server'. #1737

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
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
3 changes: 3 additions & 0 deletions public/docs/_examples/testing/ts/liteserver-test-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"startPath": "unit-tests.html"
}
20 changes: 15 additions & 5 deletions public/docs/ts/latest/testing/first-app-tests.jade
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ include ../_util-fns
We're also assuming that you're already comfortable with basic Angular 2 concepts and the tools
we introduced in the [QuickStart](../quickstart.html) and
the [Tour of Heroes](../tutorial/) tutorial
such as <code>npm</code>, <code>gulp</code>, and <code>live-server</code>.
such as <code>npm</code>, <code>gulp</code>, and <code>lite-server</code>.

.l-main-section
:marked
Expand All @@ -41,16 +41,26 @@ pre.prettyprint.lang-bash

.alert.is-important Be sure to install <code>jasmine-core</code> , not <code>jasmine</code>!

.l-main-section
:marked
## Configure `lite-server` for serving our test harness

:marked
First create a configuration file for serving up our test harness through `lite-server`.

+makeExample('testing/ts/liteserver-test-config.json', '', 'liteserver-test-config.json')

:marked
Let's make one more change to the `package.json` script commands.

**Open the `package.json` ** and scroll to the `scripts` node and add in a new one:
**Open the `package.json` ** and scroll to the `scripts` node and add the following two entries:

code-example(format="").
"test": "live-server --open=unit-tests.html"
"lite-server-test": "lite-server --config=liteserver-test-config.json",
"test": "tsc && concurrently \"npm run tsc:w\" \"npm run lite-server-test\" "

:marked
That command will launch `live-server` and open a browser to the `unit-tests.html` page we just wrote.
The `npm test` command will launch `lite-server` and open a browser to the `unit-tests.html` page we just wrote. It will also take care of recompiling your source code and reloading your browser after any change.

.l-main-section
:marked
Expand Down Expand Up @@ -127,7 +137,7 @@ code-example(format="").
:marked
### Run and Fail

Look over at the browser (live-server will have reloaded it). The browser displays
Look over at the browser (lite-server will have reloaded it). The browser displays

figure.image-display
img(src='/resources/images/devguide/first-app-tests/Jasmine-not-running-tests.png' style="width:400px;" alt="Jasmine not running any tests")
Expand Down
2 changes: 1 addition & 1 deletion public/docs/ts/latest/testing/jasmine-testing-101.jade
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ pre.prettyprint.lang-bash

We’ll be evolving these tests rapidly and it would be nice to have the browser refresh automatically as we make changes and recompile.

Let’s launch with **live-server** in a second terminal window:
Let’s launch with **lite-server** in a second terminal window:

pre.prettyprint.lang-bash
code npm start
Expand Down
2 changes: 1 addition & 1 deletion public/docs/ts/latest/testing/testing-an-angular-pipe.jade
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ include ../_util-fns
We're also assuming that you're already comfortable with basic Angular 2 concepts and the tools
we introduced in the [QuickStart](../quickstart.html) and
the [Tour of Heroes](../tutorial/) tutorial
such as <code>npm</code>, <code>gulp</code>, and <code>live-server</code>.
such as <code>npm</code>, <code>gulp</code>, and <code>lite-server</code>.

:marked
## Add another spec file
Expand Down