You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/react-server-integration-tests/README.md
+21-18
Original file line number
Diff line number
Diff line change
@@ -1,29 +1,32 @@
1
1
# Testing `react-server`
2
2
3
-
This directory contains integration tests that test the core features of `react-server` and `react-server-cli` as a server and client framework. Tests code can be found in the `react-server/integration-tests/src/__tests__` subdirectory.
3
+
This directory contains integration tests that test the core features of `react-server` and `react-server-cli` as a server and client framework. Tests code can be found in the `react-server/packages/react-server-integration-tests/src/__tests__` subdirectory.
4
4
5
5
## To run all the tests
6
6
7
-
1. cd to the `react-server/integration-tests` directory.
8
-
1. If you haven't ever run tests before: `npm install -g gulp`.
9
-
1.`npm install`
10
-
1.`gulp test`
7
+
1. Start at the root of the monorepo and follow the monorepo installation procedures.
8
+
1.`npm run build`
9
+
1.`lerna run test --stream --scope 'react-server-integration-tests'`
11
10
12
11
You should see something like:
13
12
14
13
```
15
-
$ gulp test
16
-
[09:31:12] Using gulpfile ~/code/main/react-server/packages/react-server/gulpfile.js
react-server-integration-tests: [16:36:23] Using gulpfile ~/Documents/SoprisApps/git-repos/react-server/packages/react-server-integration-tests/gulpfile.babel.js
react-server-integration-tests: Finished in 72.7 seconds
27
+
react-server-integration-tests: [16:38:04] Finished 'test' after 1.22 min
28
+
lerna success run Ran npm script 'test' in 1 package in 77.9s:
29
+
lerna success - react-server-integration-tests
27
30
```
28
31
29
32
Each little green dot is a test spec that passed. Every red "F" is a test that failed, but you probably know that if you have written Jasmine tests before. There may be a few errors logged to the console as part of tests that expect an error. As long as it says "0 failures", the tests passed.
@@ -39,7 +42,7 @@ We're using [Jasmine 2.3.x](http://jasmine.github.io/2.3/introduction.html) as o
39
42
40
43
Let's say that we wanted to just test that `react-server` will render a simple "Hello, world!" page.
41
44
42
-
First, make a subdirectory of `react-server/integration-tests/src/__tests__`, called "helloWorld". Please don't put Spec files and Page files directly in the `__tests__` directory. I expect that most of the `__tests__` sub-directories will have one Spec file and one or more Page files, but it's certainly reasonable to put multiple related Spec files in a directory together.
45
+
First, make a subdirectory of `react-server/packages/react-server-integration-tests/src/__tests__`, called "helloWorld". Please don't put Spec files and Page files directly in the `__tests__` directory. I expect that most of the `__tests__` sub-directories will have one Spec file and one or more Page files, but it's certainly reasonable to put multiple related Spec files in a directory together.
43
46
44
47
Next, we'd write a `Page` class that exercises the functionality we want to test in `react-server`:
0 commit comments