- which will start a webserver on port 9880 and auto-reloads
- whenever you edit files.
+ which will start a webserver on port 9080 and auto-reloads
+ whenever you edit files. Configuration in `rollup.config.js`.
## Testing
## Testing
-* Run syntax linter
+The `test/` setup uses [Mocha](https://mochajs.org/) to run tests. Tests use [Puppeteer](https://pptr.dev/) to control a Google Chrome headless browser and evaluate with [Assert](https://nodejs.org/api/assert.html).
+
+
+* Run integration test suite (configuration in `.mocharc.json`)
```
```
- yarn lint
+ yarn test
+ API_ON_SAME_PORT=1 yarn test
```
```
-* Run mocha test suite
+ Setting API_ON_SAME_PORT simulates having both the API and UI on the same server
+ port. That's a rare setup but something https://nominatim.openstreetmap.org/ does
+ so worth testing.
+
+ To run a single test file only
```
```
- yarn test
+ yarn run rollup -c && yarn run mocha test/details.js
```
```
+* Run syntax linter (configuration in `.eslint.json`)