Fixing PR review comments

Adds direct example for installing screeps-server-mockup
Adds test-integration script that prints where to find more info
Fixes typo in integration: testing docs
This commit is contained in:
Skyler Kehren
2020-05-02 12:51:58 +03:00
parent de4b19b2de
commit b3d7bda215
2 changed files with 9 additions and 1 deletions

View File

@@ -47,6 +47,13 @@ magnitude, it is recommended to prefer unit tests wherever possible.
Before starting to use integration testing, you must install [screeps-server-mockup](https://github.com/screepers/screeps-server-mockup) to your project.
Please view that repository for more instruction on installation.
```bash
# Using yarn:
yarn add -D screeps-server-mockup
# Using npm
npm install --save-dev screeps-server-mockup
```
You will also need to add scripts to run integration tests.
In `package.json`, add a new `test-integration` script and add the new integration testing to the main `test` script.
@@ -67,7 +74,7 @@ environment. Integration tests are completely representative of the real game
(in fact they run with an actual Screeps server). This comes at the cost of
performance and very involved setup when creating specific scenarios.
Server testing support is implmented via
Server testing support is implemented via
[screeps-server-mockup](https://github.com/screepers/screeps-server-mockup). View
this repository for more information on the API.

View File

@@ -12,6 +12,7 @@
"push-sim": "rollup -c --environment DEST:sim",
"test": "npm run test-unit",
"test-unit": "rollup -c rollup.test-unit-config.js && mocha dist/test-unit.bundle.js",
"test-integration": "echo 'See docs/in-depth/testing.md for instructions on enabling integration tests'",
"watch-main": "rollup -cw --environment DEST:main",
"watch-pserver": "rollup -cw --environment DEST:pserver",
"watch-sim": "rollup -cw --environment DEST:sim"