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

Commit 08d051d

Browse files
fourcubewardbell
authored andcommitted
docs(testing): refer to 'lite-server' instead of 'live-server'.
closes #1737 Since the QuickStart uses 'lite-server', this should also be used for the testing guide.
1 parent cc689ce commit 08d051d

File tree

4 files changed

+20
-7
lines changed

4 files changed

+20
-7
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"startPath": "unit-tests.html"
3+
}

Diff for: public/docs/ts/latest/testing/first-app-tests.jade

+15-5
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ include ../_util-fns
1515
We're also assuming that you're already comfortable with basic Angular 2 concepts and the tools
1616
we introduced in the [QuickStart](../quickstart.html) and
1717
the [Tour of Heroes](../tutorial/) tutorial
18-
such as <code>npm</code>, <code>gulp</code>, and <code>live-server</code>.
18+
such as <code>npm</code>, <code>gulp</code>, and <code>lite-server</code>.
1919

2020
.l-main-section
2121
:marked
@@ -41,16 +41,26 @@ pre.prettyprint.lang-bash
4141

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

44+
.l-main-section
45+
:marked
46+
## Configure `lite-server` for serving our test harness
47+
48+
:marked
49+
First create a configuration file for serving up our test harness through `lite-server`.
50+
51+
+makeExample('testing/ts/liteserver-test-config.json', '', 'liteserver-test-config.json')
52+
4453
:marked
4554
Let's make one more change to the `package.json` script commands.
4655

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

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

5262
:marked
53-
That command will launch `live-server` and open a browser to the `unit-tests.html` page we just wrote.
63+
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.
5464

5565
.l-main-section
5666
:marked
@@ -127,7 +137,7 @@ code-example(format="").
127137
:marked
128138
### Run and Fail
129139

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

132142
figure.image-display
133143
img(src='/resources/images/devguide/first-app-tests/Jasmine-not-running-tests.png' style="width:400px;" alt="Jasmine not running any tests")

Diff for: public/docs/ts/latest/testing/jasmine-testing-101.jade

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ pre.prettyprint.lang-bash
113113

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

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

118118
pre.prettyprint.lang-bash
119119
code npm start

Diff for: public/docs/ts/latest/testing/testing-an-angular-pipe.jade

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ include ../_util-fns
4848
We're also assuming that you're already comfortable with basic Angular 2 concepts and the tools
4949
we introduced in the [QuickStart](../quickstart.html) and
5050
the [Tour of Heroes](../tutorial/) tutorial
51-
such as <code>npm</code>, <code>gulp</code>, and <code>live-server</code>.
51+
such as <code>npm</code>, <code>gulp</code>, and <code>lite-server</code>.
5252

5353
:marked
5454
## Add another spec file

0 commit comments

Comments
 (0)