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: README.md
+21-19Lines changed: 21 additions & 19 deletions
Original file line number
Diff line number
Diff line change
@@ -8,11 +8,15 @@ Welcome to the Vue Testing Handbook!
8
8
9
9
This is a collection of short, focused examples on how to test Vue components. It uses `vue-test-utils`, the official library for testing Vue components, and Jest, a modern testing framework. It covers the `vue-test-utils` API, as well as best practises and useful parts of the Jest API for testing Vue components, as well an a demo project with all the example code.
10
10
11
+
## Style
12
+
11
13
Most sections have have a simple component or two, some tests, and the related code. Here is an example
12
14
13
-
-[Setting up for TDD](https://github.com/lmiller1990/vue-testing-handbook/blob/master/docs/setting-up-for-tdd.md)
-[Setting up for TDD](https://github.com/lmiller1990/vue-testing-handbook/blob/master/docs/setting-up-for-tdd.md). This is a guide about setting up an environment for TDD.
16
+
-[Component](https://github.com/lmiller1990/vue-testing-handbook/blob/master/demo-app/src/components/Greeting.vue). This is the component usd in the guide.
17
+
-[Test](https://github.com/lmiller1990/vue-testing-handbook/blob/master/demo-app/tests/unit/Greeting.spec.js). This is the test used in the guide.
18
+
19
+
Guides should be short, concise, and focused on a single concept. The relevant code should be linked in the article, and easily reproduced by the reader.
16
20
17
21
## Languages
18
22
@@ -22,21 +26,23 @@ We are aiming to support Japanese and English for now.
22
26
23
27
### Development enviroment
24
28
25
-
Clone the repo and run `yarn`. Then run `yarn dev`to open the dev server. Access it on `localhost:8080`.
29
+
Vuepress is used to generate the static website. Articles are written in markdown.
26
30
27
-
There is an example project to run tests and examples. To run it, `cd demo-app`, then run `yarn`. To run the test run `yarn test:unit`.
31
+
#### Guides
28
32
29
-
### Existing pages
33
+
Clone the repo and run `yarn` to install the dependencies. Then run `yarn dev` to open the dev server. Access it on `localhost:8080`.
30
34
31
-
Make an issue regarding what you think can be improved, and why. Once everyone is happy with the addition, add it in English. Someone will translate it so the guide stays in sync for both languages, and it will be merged.
35
+
#### Code Samples
32
36
33
-
### Adding a new page
37
+
There is an example project to run tests and examples used in the guides. To run it the demo app, run `cd demo-app` to navigate into the project, then run `yarn` to install the dependencies. Run `yarn test:unit` to execute the test suite.
34
38
35
-
Make an issue explaining the benefit of the new page. Once everyone is in agreement, add the new page. You should also add an example to the `demo-app` project, so readers can easily recreate the scenario. You should also create a new page for the Japaense documentation, so someone can translate it later. This helps keep the guie up to date.
39
+
### Updates existing guides
36
40
37
-
### Fixing grammar or stylist improvements
41
+
Make an issue regarding what you think can be improved, or just make a PR.
38
42
39
-
Just make the PR.
43
+
### Adding a new page
44
+
45
+
Make an issue explaining the benefit of the new page. You should also add any relevant code and tests in the `demo-app` project, so readers can easily recreate the scenario.
40
46
41
47
## Vue Testing Handbook
42
48
@@ -60,18 +66,14 @@ Most sections have have a simple component or two, some tests, and the related c
0 commit comments