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:
@@ -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.
|
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.
|
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.
|
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.
|
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
|
(in fact they run with an actual Screeps server). This comes at the cost of
|
||||||
performance and very involved setup when creating specific scenarios.
|
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
|
[screeps-server-mockup](https://github.com/screepers/screeps-server-mockup). View
|
||||||
this repository for more information on the API.
|
this repository for more information on the API.
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
"push-sim": "rollup -c --environment DEST:sim",
|
"push-sim": "rollup -c --environment DEST:sim",
|
||||||
"test": "npm run test-unit",
|
"test": "npm run test-unit",
|
||||||
"test-unit": "rollup -c rollup.test-unit-config.js && mocha dist/test-unit.bundle.js",
|
"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-main": "rollup -cw --environment DEST:main",
|
||||||
"watch-pserver": "rollup -cw --environment DEST:pserver",
|
"watch-pserver": "rollup -cw --environment DEST:pserver",
|
||||||
"watch-sim": "rollup -cw --environment DEST:sim"
|
"watch-sim": "rollup -cw --environment DEST:sim"
|
||||||
|
|||||||
Reference in New Issue
Block a user