@@ -103,6 +103,9 @@ Also see the [Writing JavaScript Libraries Tutorial](https://wonderlandengine.co
103
103
104
104
## Contributing
105
105
106
+ * [ API code] ( ./packages/api ) : The ` @wonderlandengine/api ` source code
107
+ * [ End2End tests] ( ./packages/test-e2e ) : User-land testing for the ` @wonderlandengine/api ` package
108
+
106
109
### Installation
107
110
108
111
Make sure to install dependencies first:
@@ -116,82 +119,17 @@ npm i
116
119
To build the TypeScript code, use one of:
117
120
118
121
``` sh
122
+ cd api
119
123
npm run build
120
124
npm run build:watch
121
125
```
122
126
123
- ### Test
124
-
125
- To run all the tests, use:
126
-
127
- ``` sh
128
- npm run test -- --deploy path/to/wonderland/deploy
129
- ```
130
-
131
- It's required to pass the Wonderland Editor deploy folder as a CLI argument using
132
- the ` --deploy ` argument.
133
-
134
- If no such flag is passed, the test framework will assume
135
- that the deploy folder is located in ` ../../deploy ` .
136
-
137
- #### Test Projects
138
-
139
- Some tests use projects as inputs, e.g.,
140
- * ` animation.tests.ts `
141
- * ` component.tests.ts `
142
- * ` mesh.tests.ts `
143
- * ` scene.test.ts `
144
- * ` scene-gltf.test.ts `
145
-
146
- Those projects are required to be built before the tests can run. You can build all projects using:
147
-
148
- ``` sh
149
- npm run test:build -- path/to/wonderlandengine
150
- ```
151
-
152
- Each projects ` deploy/ ` will be copied into ` test/resources/projects ` .
153
-
154
- #### Test File
155
-
156
- To run the tests in a file, use:
157
-
158
- ``` sh
159
- npm run test -- [PATH] --deploy path/to/wonderland/deploy
160
- ```
161
-
162
- Example with the component file:
163
-
164
- ``` sh
165
- npm run test -- ./test/component.test.ts --deploy path/to/wonderland/deploy
166
- ```
167
-
168
- #### Watch
169
-
170
- It's possible to watch one/multiple test(s) using ` --watch ` :
171
-
172
- ``` sh
173
- npm run test -- --deploy path/to/wonderland/deploy --watch
174
- ```
175
-
176
- #### Grep
177
-
178
- The runner uses Mocha, which supports filtering tests using [ regexp] ( https://mochajs.org/api/mocha#grep ) .
179
-
180
- You can provide a regexp using ` --grep ` or ` -g ` :
181
-
182
- ``` sh
183
- npm run test -- -g ' MeshComponent'
184
- ```
185
-
186
- The ` grep ` flag can be mixed with the positional file argument:
187
-
188
- ``` sh
189
- npm run test -- ./test/component.test.ts -g ' MeshComponent'
190
- ```
127
+ ### End-to-End Test
191
128
192
- This command will only run the tests matching the "MeshComponent" string in the ` test/component.test.ts ` file.
129
+ For information about how to run the end-to-end tests, have a look at the
130
+ ` packages/test-e2e ` [ README.md] ( ./test/README.md )
193
131
194
132
## License
195
133
196
134
Wonderland Engine API TypeScript and JavaScript code is released under MIT license.
197
- The runtime and editor are licensed under the [ Wonderland Engine EULA] ( https://wonderlandengine.com/eula )
135
+ The runtime and editor are licensed under the [ Wonderland Engine EULA] ( https://wonderlandengine.com/eula ) .
0 commit comments