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
+30-7Lines changed: 30 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -68,16 +68,17 @@ Publish the NPM package manually. The output is found in the `dist` folder.
68
68
69
69
- Install Cocoapods in the example/ios folder `cd example/ios && pod install && cd ..`
70
70
71
-
###Contributing
71
+
## Contributing
72
72
73
+
When making contributions to the project, an important part is testing.
73
74
In the `package` folder, we have several scripts set up to help you maintain the quality of the codebase and test your changes:
74
75
75
76
-`yarn lint` — Lints the code for potential errors and to ensure consistency with our coding standards.
76
77
-`yarn tsc` — Runs the TypeScript compiler to check for typing issues.
77
78
-`yarn test` — Executes the unit tests to ensure existing features work as expected after changes.
78
79
-`yarn e2e` — Runs end-to-end tests. For these tests to run properly, you need to have the example app running. Use `yarn ios` or `yarn android` in the `example` folder and navigate to the Tests screen within the app.
79
80
80
-
####Running End-to-End Tests
81
+
## Running End-to-End Tests
81
82
82
83
To ensure the best reliability, we encourage running end-to-end tests before submitting your changes:
83
84
@@ -86,17 +87,23 @@ To ensure the best reliability, we encourage running end-to-end tests before sub
86
87
cd example
87
88
yarn ios # or yarn android for Android testing
88
89
```
90
+
91
+
Once the app is open in your simulator or device, press the "Tests" item at the bottom of the list.
89
92
90
93
2. With the example app running and the Tests screen open, run the following command in the `package` folder:
91
94
```sh
92
95
yarn e2e
93
96
```
94
97
95
98
This will run through the automated tests and verify that your changes have not introduced any regressions.
99
+
You can also run a particular using the following command:
100
+
```sh
101
+
E2E=true yarn test -i e2e/Colors
102
+
```
96
103
97
-
####Writing End-to-End Tests
104
+
### Writing End-to-End Tests
98
105
99
-
Contributing end-to-end tests to React Native Skia is invaluable. Below you'll find guidelines for writing tests using the `eval`and `draw` commands.
106
+
Contributing end-to-end tests to React Native Skia is extremely useful. Below you'll find guidelines for writing tests using the `eval`, `draw`, and `drawOffscreen` commands.
100
107
101
108
e2e tests are located in the `package/__tests__/e2e/` directory. You can create a file there or add a new test to an existing file depending on what is most sensible.
102
109
When looking to contribute a new test, you can refer to existing tests to see how these can be built.
@@ -117,15 +124,18 @@ Both the `eval` and `draw` commands require a function that will be executed in
0 commit comments