[fix] fix run server without wait until app ready
mock server need to be started after app ready, be cause router plugin are run in beforeHook, now I can't do the api test, even the buildin unit test are failed.
before:

after:

Checklist
- [ *]
npm testpasses - [ *] tests and/or benchmarks are included
- [ ] documentation is changed or added
- [ *] commit message follows commit guidelines
Affected core subsystem(s)
Description of change
Add a test case to show where is the problem?
@fengmk2 you may notice that the test case build in egg.js itselt could not pass already, as my first screenshot show, the http client will response 404 cause failed once it request a specify url. because the mock server start without wait router module to register it routes to middleware.
node_modules/egg-core/lib/egg.js // L303 - 305, routes register in beforeStart hook.
node_modules/egg-mock/lib/app.js // L106 - 107, mock server start without wait routes registered
This bug cause mock server start without any routes, and all test case related with route response 404.
So, in this PR, I just fix this bug, and no need to provide more test case, just let the buildin test case pass. can run
npx mocha test/mock_request.test.js
to see the effects, now all test cases should be passed.
The master branch ci is pass https://github.com/eggjs/egg-mock/runs/6345153680?check_suite_focus=true