@@ -28,11 +28,12 @@ the various packages, please execute the following:
28
28
make init
29
29
```
30
30
31
- > please note that it will take a while as this project uses a lot of dependencies…'
31
+ > please note that it will take a while as this project uses a lot of dependencies…
32
32
33
33
### Windows
34
34
35
- If you want to build this project on Windows, it is recommended to use either WSL 2, or Git bash + ` choco install make ` .
35
+ If you want to build this project on Windows, it is recommended to use either WSL 2,
36
+ or Git bash + ` choco install make ` .
36
37
37
38
## Development
38
39
@@ -77,6 +78,13 @@ You can also build the packages without running a watcher, you have two options:
77
78
78
79
### Testing
79
80
81
+ #### Unit tests
82
+
83
+ Unit tests for each package are located in the ` packages/<pkg>/tests ` folder, we're using jest
84
+ as a test running and ` react-test-renderer ` as a testing library, some tests are still using
85
+ ` enzyme ` , but this lib is not maintained anymore and doesn't support newer versions of React,
86
+ so those should eventually be migrated.
87
+
80
88
To run unit tests on all packages, run the following command:
81
89
82
90
```
@@ -92,6 +100,14 @@ make pkg-test-bar
92
100
93
101
where ` bar ` is the name of the targeted nivo package.
94
102
103
+ #### End-to-end tests
104
+
105
+ Sometimes it's difficult to test certain things in unit tests, from our experience, animations
106
+ and interactions can be tricky to test via unit tests only, so we also try to have end-to-end tests.
107
+
108
+ We're using ` cypress ` for writing such tests, and those are located in the ` cypress/src/components `
109
+ folder, as we introduced end-to-end tests later, not all packages have some.
110
+
95
111
### Formatting
96
112
97
113
Nivo uses prettier in order to provide a consistent code style.
0 commit comments