From 1db41399c4bd0c7269339287880fbc72f2d97755 Mon Sep 17 00:00:00 2001 From: Auto Doc Publisher Date: Wed, 15 Nov 2017 00:55:09 +0000 Subject: [PATCH] docs: auto generate by ci docs(core/unittest): translate unittest.md (#1660) --- api/Agent.html | 2 +- api/AgentWorkerLoader.html | 2 +- api/AppInfo.html | 2 +- api/AppWorkerLoader.html | 2 +- api/Application.html | 2 +- api/BaseContextLogger.html | 2 +- api/Config.html | 2 +- api/Context.html | 2 +- api/ContextLoader.html | 2 +- api/Egg.html | 2 +- api/EggApplication.html | 2 +- api/EggCore.html | 2 +- api/EggLoader.html | 2 +- api/FileLoader.html | 2 +- api/Helper.html | 2 +- api/I18n.html | 2 +- api/Messenger.html | 2 +- api/Request.html | 2 +- api/Response.html | 2 +- api/Router.html | 2 +- api/app_extend_context.js.html | 2 +- api/app_extend_helper.js.html | 2 +- api/app_extend_request.js.html | 2 +- api/app_extend_response.js.html | 2 +- api/config_config.default.js.html | 2 +- api/config_plugin.js.html | 2 +- api/global.html | 2 +- api/global.html#BaseContextClass | 2 +- api/global.html#Controller | 2 +- api/global.html#Service | 2 +- api/index.html | 2 +- api/index.js.html | 2 +- api/lib_agent.js.html | 2 +- api/lib_application.js.html | 2 +- api/lib_core_base_context_class.js.html | 2 +- api/lib_core_base_context_logger.js.html | 2 +- api/lib_core_context_httpclient.js.html | 2 +- api/lib_core_messenger.js.html | 2 +- api/lib_egg.js.html | 2 +- api/lib_jsdoc_context.jsdoc.html | 2 +- api/lib_jsdoc_request.jsdoc.html | 2 +- api/lib_jsdoc_response.jsdoc.html | 2 +- api/lib_loader_agent_worker_loader.js.html | 2 +- api/lib_loader_app_worker_loader.js.html | 2 +- ...opment@2.0.0@egg-development_agent.js.html | 2 +- ...-development_config_config.default.js.html | 2 +- ...dules__egg-i18n@2.0.0@egg-i18n_app.js.html | 2 +- ...@2.0.0@egg-i18n_app_extend_context.js.html | 2 +- ...0.0@egg-i18n_config_config.default.js.html | 2 +- ...0@egg-jsonp_app_extend_application.js.html | 2 +- ...2.0.0@egg-jsonp_app_extend_context.js.html | 2 +- ....0@egg-jsonp_config_config.default.js.html | 2 +- ...g-logrotator_config_config.default.js.html | 2 +- ...0@egg-multipart_app_extend_context.js.html | 2 +- ...gg-multipart_config_config.default.js.html | 2 +- ....0.0@egg-schedule_app_extend_agent.js.html | 2 +- ....0@egg-security_app_extend_context.js.html | 2 +- ...egg-security_config_config.default.js.html | 2 +- ...egg-session_app_extend_application.js.html | 2 +- ...0@egg-static_config_config.default.js.html | 2 +- ....0@egg-view_app_extend_application.js.html | 2 +- ...@2.0.0@egg-view_app_extend_context.js.html | 2 +- ...0.0@egg-view_config_config.default.js.html | 2 +- ...@egg-watcher_config_config.default.js.html | 2 +- api/node_modules_egg-core_lib_egg.js.html | 2 +- ...egg-core_lib_loader_context_loader.js.html | 2 +- ...les_egg-core_lib_loader_egg_loader.js.html | 2 +- ...es_egg-core_lib_loader_file_loader.js.html | 2 +- ...s_egg-core_lib_loader_mixin_config.js.html | 2 +- ...g-core_lib_loader_mixin_controller.js.html | 2 +- ...s_egg-core_lib_loader_mixin_custom.js.html | 2 +- ...s_egg-core_lib_loader_mixin_extend.js.html | 2 +- ...g-core_lib_loader_mixin_middleware.js.html | 2 +- ...s_egg-core_lib_loader_mixin_plugin.js.html | 2 +- ...s_egg-core_lib_loader_mixin_router.js.html | 2 +- ..._egg-core_lib_loader_mixin_service.js.html | 2 +- ...-core_lib_utils_base_context_class.js.html | 2 +- ...e_modules_egg-core_lib_utils_index.js.html | 2 +- ..._modules_egg-core_lib_utils_router.js.html | 2 +- en/core/unittest.html | 272 ++++++++++++++++++ 80 files changed, 351 insertions(+), 79 deletions(-) create mode 100644 en/core/unittest.html diff --git a/api/Agent.html b/api/Agent.html index 463f2dea29..f6bc215def 100644 --- a/api/Agent.html +++ b/api/Agent.html @@ -1499,7 +1499,7 @@
Example

diff --git a/api/AgentWorkerLoader.html b/api/AgentWorkerLoader.html index ccc3cb1a4f..d7c0790749 100644 --- a/api/AgentWorkerLoader.html +++ b/api/AgentWorkerLoader.html @@ -263,7 +263,7 @@

loadConfig<
- Documentation generated by JSDoc 3.5.5 on Tue Nov 14 2017 02:39:47 GMT+0000 (UTC) using the Minami theme. + Documentation generated by JSDoc 3.5.5 on Wed Nov 15 2017 00:54:57 GMT+0000 (UTC) using the Minami theme.
diff --git a/api/AppInfo.html b/api/AppInfo.html index d0cabfe4d7..efaf926972 100644 --- a/api/AppInfo.html +++ b/api/AppInfo.html @@ -634,7 +634,7 @@

scope
- Documentation generated by JSDoc 3.5.5 on Tue Nov 14 2017 02:39:47 GMT+0000 (UTC) using the Minami theme. + Documentation generated by JSDoc 3.5.5 on Wed Nov 15 2017 00:54:57 GMT+0000 (UTC) using the Minami theme.
diff --git a/api/AppWorkerLoader.html b/api/AppWorkerLoader.html index 85ff2eb973..018039389e 100644 --- a/api/AppWorkerLoader.html +++ b/api/AppWorkerLoader.html @@ -349,7 +349,7 @@

loadConfig<
- Documentation generated by JSDoc 3.5.5 on Tue Nov 14 2017 02:39:47 GMT+0000 (UTC) using the Minami theme. + Documentation generated by JSDoc 3.5.5 on Wed Nov 15 2017 00:54:57 GMT+0000 (UTC) using the Minami theme.
diff --git a/api/Application.html b/api/Application.html index c7535cbe62..7d673b7daf 100644 --- a/api/Application.html +++ b/api/Application.html @@ -2100,7 +2100,7 @@

Parameters:

- Documentation generated by JSDoc 3.5.5 on Tue Nov 14 2017 02:39:47 GMT+0000 (UTC) using the Minami theme. + Documentation generated by JSDoc 3.5.5 on Wed Nov 15 2017 00:54:57 GMT+0000 (UTC) using the Minami theme.
diff --git a/api/BaseContextLogger.html b/api/BaseContextLogger.html index 5407d925f0..1d83c7bf8c 100644 --- a/api/BaseContextLogger.html +++ b/api/BaseContextLogger.html @@ -546,7 +546,7 @@

warn
- Documentation generated by JSDoc 3.5.5 on Tue Nov 14 2017 02:39:47 GMT+0000 (UTC) using the Minami theme. + Documentation generated by JSDoc 3.5.5 on Wed Nov 15 2017 00:54:57 GMT+0000 (UTC) using the Minami theme.
diff --git a/api/Config.html b/api/Config.html index 074bfab091..a2082c5df9 100644 --- a/api/Config.html +++ b/api/Config.html @@ -4622,7 +4622,7 @@
Properties:

- Documentation generated by JSDoc 3.5.5 on Tue Nov 14 2017 02:39:47 GMT+0000 (UTC) using the Minami theme. + Documentation generated by JSDoc 3.5.5 on Wed Nov 15 2017 00:54:57 GMT+0000 (UTC) using the Minami theme.
diff --git a/api/Context.html b/api/Context.html index 623619e940..06cf87505f 100644 --- a/api/Context.html +++ b/api/Context.html @@ -1937,7 +1937,7 @@
Parameters:

- Documentation generated by JSDoc 3.5.5 on Tue Nov 14 2017 02:39:47 GMT+0000 (UTC) using the Minami theme. + Documentation generated by JSDoc 3.5.5 on Wed Nov 15 2017 00:54:57 GMT+0000 (UTC) using the Minami theme.
diff --git a/api/ContextLoader.html b/api/ContextLoader.html index d566b3e884..7bf1acc473 100644 --- a/api/ContextLoader.html +++ b/api/ContextLoader.html @@ -476,7 +476,7 @@

parse
- Documentation generated by JSDoc 3.5.5 on Tue Nov 14 2017 02:39:47 GMT+0000 (UTC) using the Minami theme. + Documentation generated by JSDoc 3.5.5 on Wed Nov 15 2017 00:54:57 GMT+0000 (UTC) using the Minami theme.
diff --git a/api/Egg.html b/api/Egg.html index 4e200a535e..ff4fa2853c 100644 --- a/api/Egg.html +++ b/api/Egg.html @@ -616,7 +616,7 @@

Subscript
- Documentation generated by JSDoc 3.5.5 on Tue Nov 14 2017 02:39:47 GMT+0000 (UTC) using the Minami theme. + Documentation generated by JSDoc 3.5.5 on Wed Nov 15 2017 00:54:57 GMT+0000 (UTC) using the Minami theme.
diff --git a/api/EggApplication.html b/api/EggApplication.html index 42707566b1..03a52b8bad 100644 --- a/api/EggApplication.html +++ b/api/EggApplication.html @@ -3153,7 +3153,7 @@

Parameters:

- Documentation generated by JSDoc 3.5.5 on Tue Nov 14 2017 02:39:47 GMT+0000 (UTC) using the Minami theme. + Documentation generated by JSDoc 3.5.5 on Wed Nov 15 2017 00:54:57 GMT+0000 (UTC) using the Minami theme.
diff --git a/api/EggCore.html b/api/EggCore.html index b29f73f70f..c89272f60b 100644 --- a/api/EggCore.html +++ b/api/EggCore.html @@ -1962,7 +1962,7 @@
Parameters:

- Documentation generated by JSDoc 3.5.5 on Tue Nov 14 2017 02:39:47 GMT+0000 (UTC) using the Minami theme. + Documentation generated by JSDoc 3.5.5 on Wed Nov 15 2017 00:54:57 GMT+0000 (UTC) using the Minami theme.
diff --git a/api/EggLoader.html b/api/EggLoader.html index 76c816316b..b24ba27374 100644 --- a/api/EggLoader.html +++ b/api/EggLoader.html @@ -2786,7 +2786,7 @@
Parameters:

- Documentation generated by JSDoc 3.5.5 on Tue Nov 14 2017 02:39:47 GMT+0000 (UTC) using the Minami theme. + Documentation generated by JSDoc 3.5.5 on Wed Nov 15 2017 00:54:57 GMT+0000 (UTC) using the Minami theme.
diff --git a/api/FileLoader.html b/api/FileLoader.html index 57c9e258e6..b77a8cef02 100644 --- a/api/FileLoader.html +++ b/api/FileLoader.html @@ -695,7 +695,7 @@

parse
- Documentation generated by JSDoc 3.5.5 on Tue Nov 14 2017 02:39:47 GMT+0000 (UTC) using the Minami theme. + Documentation generated by JSDoc 3.5.5 on Wed Nov 15 2017 00:54:57 GMT+0000 (UTC) using the Minami theme.
diff --git a/api/Helper.html b/api/Helper.html index bd8455363c..986b048d9d 100644 --- a/api/Helper.html +++ b/api/Helper.html @@ -508,7 +508,7 @@
Example

- Documentation generated by JSDoc 3.5.5 on Tue Nov 14 2017 02:39:47 GMT+0000 (UTC) using the Minami theme. + Documentation generated by JSDoc 3.5.5 on Wed Nov 15 2017 00:54:57 GMT+0000 (UTC) using the Minami theme.
diff --git a/api/I18n.html b/api/I18n.html index 3ac24eed6a..7bb6fc778e 100644 --- a/api/I18n.html +++ b/api/I18n.html @@ -259,7 +259,7 @@
Example

- Documentation generated by JSDoc 3.5.5 on Tue Nov 14 2017 02:39:47 GMT+0000 (UTC) using the Minami theme. + Documentation generated by JSDoc 3.5.5 on Wed Nov 15 2017 00:54:57 GMT+0000 (UTC) using the Minami theme.
diff --git a/api/Messenger.html b/api/Messenger.html index 194261b6f1..d5f651f4fb 100644 --- a/api/Messenger.html +++ b/api/Messenger.html @@ -1164,7 +1164,7 @@
Parameters:

- Documentation generated by JSDoc 3.5.5 on Tue Nov 14 2017 02:39:47 GMT+0000 (UTC) using the Minami theme. + Documentation generated by JSDoc 3.5.5 on Wed Nov 15 2017 00:54:57 GMT+0000 (UTC) using the Minami theme.
diff --git a/api/Request.html b/api/Request.html index ed6ec556aa..7e54aed679 100644 --- a/api/Request.html +++ b/api/Request.html @@ -1246,7 +1246,7 @@
Parameters:

- Documentation generated by JSDoc 3.5.5 on Tue Nov 14 2017 02:39:47 GMT+0000 (UTC) using the Minami theme. + Documentation generated by JSDoc 3.5.5 on Wed Nov 15 2017 00:54:57 GMT+0000 (UTC) using the Minami theme.
diff --git a/api/Response.html b/api/Response.html index e387973653..39c3488672 100644 --- a/api/Response.html +++ b/api/Response.html @@ -243,7 +243,7 @@

realStatus<
- Documentation generated by JSDoc 3.5.5 on Tue Nov 14 2017 02:39:47 GMT+0000 (UTC) using the Minami theme. + Documentation generated by JSDoc 3.5.5 on Wed Nov 15 2017 00:54:57 GMT+0000 (UTC) using the Minami theme.
diff --git a/api/Router.html b/api/Router.html index 462d5ecd9e..8d58895304 100644 --- a/api/Router.html +++ b/api/Router.html @@ -849,7 +849,7 @@

Example

- Documentation generated by JSDoc 3.5.5 on Tue Nov 14 2017 02:39:47 GMT+0000 (UTC) using the Minami theme. + Documentation generated by JSDoc 3.5.5 on Wed Nov 15 2017 00:54:57 GMT+0000 (UTC) using the Minami theme.
diff --git a/api/app_extend_context.js.html b/api/app_extend_context.js.html index 6aba84b9c4..bff3889e54 100644 --- a/api/app_extend_context.js.html +++ b/api/app_extend_context.js.html @@ -308,7 +308,7 @@

app/extend/context.js


- Documentation generated by JSDoc 3.5.5 on Tue Nov 14 2017 02:39:47 GMT+0000 (UTC) using the Minami theme. + Documentation generated by JSDoc 3.5.5 on Wed Nov 15 2017 00:54:57 GMT+0000 (UTC) using the Minami theme.
diff --git a/api/app_extend_helper.js.html b/api/app_extend_helper.js.html index 0d13a5e515..e4cc14c507 100644 --- a/api/app_extend_helper.js.html +++ b/api/app_extend_helper.js.html @@ -104,7 +104,7 @@

app/extend/helper.js


- Documentation generated by JSDoc 3.5.5 on Tue Nov 14 2017 02:39:47 GMT+0000 (UTC) using the Minami theme. + Documentation generated by JSDoc 3.5.5 on Wed Nov 15 2017 00:54:57 GMT+0000 (UTC) using the Minami theme.
diff --git a/api/app_extend_request.js.html b/api/app_extend_request.js.html index b64df842a3..53892a9e52 100644 --- a/api/app_extend_request.js.html +++ b/api/app_extend_request.js.html @@ -330,7 +330,7 @@

app/extend/request.js


- Documentation generated by JSDoc 3.5.5 on Tue Nov 14 2017 02:39:47 GMT+0000 (UTC) using the Minami theme. + Documentation generated by JSDoc 3.5.5 on Wed Nov 15 2017 00:54:57 GMT+0000 (UTC) using the Minami theme.
diff --git a/api/app_extend_response.js.html b/api/app_extend_response.js.html index 4171ef45a4..a76e73da8f 100644 --- a/api/app_extend_response.js.html +++ b/api/app_extend_response.js.html @@ -134,7 +134,7 @@

app/extend/response.js


- Documentation generated by JSDoc 3.5.5 on Tue Nov 14 2017 02:39:47 GMT+0000 (UTC) using the Minami theme. + Documentation generated by JSDoc 3.5.5 on Wed Nov 15 2017 00:54:57 GMT+0000 (UTC) using the Minami theme.
diff --git a/api/config_config.default.js.html b/api/config_config.default.js.html index ff1de9a430..ede92074ad 100644 --- a/api/config_config.default.js.html +++ b/api/config_config.default.js.html @@ -374,7 +374,7 @@

config/config.default.js


- Documentation generated by JSDoc 3.5.5 on Tue Nov 14 2017 02:39:47 GMT+0000 (UTC) using the Minami theme. + Documentation generated by JSDoc 3.5.5 on Wed Nov 15 2017 00:54:57 GMT+0000 (UTC) using the Minami theme.
diff --git a/api/config_plugin.js.html b/api/config_plugin.js.html index 0999a32cc8..d81e1cfea8 100644 --- a/api/config_plugin.js.html +++ b/api/config_plugin.js.html @@ -197,7 +197,7 @@

config/plugin.js


- Documentation generated by JSDoc 3.5.5 on Tue Nov 14 2017 02:39:47 GMT+0000 (UTC) using the Minami theme. + Documentation generated by JSDoc 3.5.5 on Wed Nov 15 2017 00:54:57 GMT+0000 (UTC) using the Minami theme.
diff --git a/api/global.html b/api/global.html index 89397f3185..1cb406c464 100644 --- a/api/global.html +++ b/api/global.html @@ -1304,7 +1304,7 @@
Properties

- Documentation generated by JSDoc 3.5.5 on Tue Nov 14 2017 02:39:47 GMT+0000 (UTC) using the Minami theme. + Documentation generated by JSDoc 3.5.5 on Wed Nov 15 2017 00:54:57 GMT+0000 (UTC) using the Minami theme.
diff --git a/api/global.html#BaseContextClass b/api/global.html#BaseContextClass index f00e892d15..19207fe8a1 100644 --- a/api/global.html#BaseContextClass +++ b/api/global.html#BaseContextClass @@ -829,7 +829,7 @@ it's instantiated in context level,
- Documentation generated by JSDoc 3.5.5 on Tue Nov 14 2017 02:39:47 GMT+0000 (UTC) using the Minami theme. + Documentation generated by JSDoc 3.5.5 on Wed Nov 15 2017 00:54:57 GMT+0000 (UTC) using the Minami theme.
diff --git a/api/global.html#Controller b/api/global.html#Controller index e911dc1a51..906344e866 100644 --- a/api/global.html#Controller +++ b/api/global.html#Controller @@ -448,7 +448,7 @@
- Documentation generated by JSDoc 3.5.5 on Tue Nov 14 2017 02:39:47 GMT+0000 (UTC) using the Minami theme. + Documentation generated by JSDoc 3.5.5 on Wed Nov 15 2017 00:54:57 GMT+0000 (UTC) using the Minami theme.
diff --git a/api/global.html#Service b/api/global.html#Service index 16b4ba0b61..fa30a52e79 100644 --- a/api/global.html#Service +++ b/api/global.html#Service @@ -448,7 +448,7 @@
- Documentation generated by JSDoc 3.5.5 on Tue Nov 14 2017 02:39:47 GMT+0000 (UTC) using the Minami theme. + Documentation generated by JSDoc 3.5.5 on Wed Nov 15 2017 00:54:57 GMT+0000 (UTC) using the Minami theme.
diff --git a/api/index.html b/api/index.html index 6a0d65203b..f7fcc24752 100644 --- a/api/index.html +++ b/api/index.html @@ -67,7 +67,7 @@

Classes

  • Agent
    • - Documentation generated by JSDoc 3.5.5 on Tue Nov 14 2017 02:39:47 GMT+0000 (UTC) using the Minami theme. + Documentation generated by JSDoc 3.5.5 on Wed Nov 15 2017 00:54:57 GMT+0000 (UTC) using the Minami theme.
      diff --git a/api/index.js.html b/api/index.js.html index 1b110268d4..922524fefa 100644 --- a/api/index.js.html +++ b/api/index.js.html @@ -120,7 +120,7 @@

      index.js


      - Documentation generated by JSDoc 3.5.5 on Tue Nov 14 2017 02:39:47 GMT+0000 (UTC) using the Minami theme. + Documentation generated by JSDoc 3.5.5 on Wed Nov 15 2017 00:54:57 GMT+0000 (UTC) using the Minami theme.
      diff --git a/api/lib_agent.js.html b/api/lib_agent.js.html index 25805e88a5..dd27a7f3d5 100644 --- a/api/lib_agent.js.html +++ b/api/lib_agent.js.html @@ -143,7 +143,7 @@

      lib/agent.js


      - Documentation generated by JSDoc 3.5.5 on Tue Nov 14 2017 02:39:47 GMT+0000 (UTC) using the Minami theme. + Documentation generated by JSDoc 3.5.5 on Wed Nov 15 2017 00:54:57 GMT+0000 (UTC) using the Minami theme.
      diff --git a/api/lib_application.js.html b/api/lib_application.js.html index 50955a8db4..e56be9271e 100644 --- a/api/lib_application.js.html +++ b/api/lib_application.js.html @@ -298,7 +298,7 @@

      lib/application.js


      - Documentation generated by JSDoc 3.5.5 on Tue Nov 14 2017 02:39:47 GMT+0000 (UTC) using the Minami theme. + Documentation generated by JSDoc 3.5.5 on Wed Nov 15 2017 00:54:57 GMT+0000 (UTC) using the Minami theme.
      diff --git a/api/lib_core_base_context_class.js.html b/api/lib_core_base_context_class.js.html index baadf8f5eb..329db04b7b 100644 --- a/api/lib_core_base_context_class.js.html +++ b/api/lib_core_base_context_class.js.html @@ -81,7 +81,7 @@

      lib/core/base_context_class.js


      - Documentation generated by JSDoc 3.5.5 on Tue Nov 14 2017 02:39:47 GMT+0000 (UTC) using the Minami theme. + Documentation generated by JSDoc 3.5.5 on Wed Nov 15 2017 00:54:57 GMT+0000 (UTC) using the Minami theme.
      diff --git a/api/lib_core_base_context_logger.js.html b/api/lib_core_base_context_logger.js.html index 817d01bfbd..b80cce51b0 100644 --- a/api/lib_core_base_context_logger.js.html +++ b/api/lib_core_base_context_logger.js.html @@ -124,7 +124,7 @@

      lib/core/base_context_logger.js


      - Documentation generated by JSDoc 3.5.5 on Tue Nov 14 2017 02:39:47 GMT+0000 (UTC) using the Minami theme. + Documentation generated by JSDoc 3.5.5 on Wed Nov 15 2017 00:54:57 GMT+0000 (UTC) using the Minami theme.
      diff --git a/api/lib_core_context_httpclient.js.html b/api/lib_core_context_httpclient.js.html index 397fdbbcc3..e49e858b89 100644 --- a/api/lib_core_context_httpclient.js.html +++ b/api/lib_core_context_httpclient.js.html @@ -89,7 +89,7 @@

      lib/core/context_httpclient.js


      - Documentation generated by JSDoc 3.5.5 on Tue Nov 14 2017 02:39:47 GMT+0000 (UTC) using the Minami theme. + Documentation generated by JSDoc 3.5.5 on Wed Nov 15 2017 00:54:57 GMT+0000 (UTC) using the Minami theme.
      diff --git a/api/lib_core_messenger.js.html b/api/lib_core_messenger.js.html index a96545d48c..6628e2be50 100644 --- a/api/lib_core_messenger.js.html +++ b/api/lib_core_messenger.js.html @@ -198,7 +198,7 @@

      lib/core/messenger.js


      - Documentation generated by JSDoc 3.5.5 on Tue Nov 14 2017 02:39:47 GMT+0000 (UTC) using the Minami theme. + Documentation generated by JSDoc 3.5.5 on Wed Nov 15 2017 00:54:57 GMT+0000 (UTC) using the Minami theme.
      diff --git a/api/lib_egg.js.html b/api/lib_egg.js.html index e794726e8b..63c6a5fe01 100644 --- a/api/lib_egg.js.html +++ b/api/lib_egg.js.html @@ -468,7 +468,7 @@

      lib/egg.js


      - Documentation generated by JSDoc 3.5.5 on Tue Nov 14 2017 02:39:47 GMT+0000 (UTC) using the Minami theme. + Documentation generated by JSDoc 3.5.5 on Wed Nov 15 2017 00:54:57 GMT+0000 (UTC) using the Minami theme.
      diff --git a/api/lib_jsdoc_context.jsdoc.html b/api/lib_jsdoc_context.jsdoc.html index 73cf643de2..3334b5e7f5 100644 --- a/api/lib_jsdoc_context.jsdoc.html +++ b/api/lib_jsdoc_context.jsdoc.html @@ -103,7 +103,7 @@

      lib/jsdoc/context.jsdoc


      - Documentation generated by JSDoc 3.5.5 on Tue Nov 14 2017 02:39:47 GMT+0000 (UTC) using the Minami theme. + Documentation generated by JSDoc 3.5.5 on Wed Nov 15 2017 00:54:57 GMT+0000 (UTC) using the Minami theme.
      diff --git a/api/lib_jsdoc_request.jsdoc.html b/api/lib_jsdoc_request.jsdoc.html index ab5b7509b7..bb86f973a8 100644 --- a/api/lib_jsdoc_request.jsdoc.html +++ b/api/lib_jsdoc_request.jsdoc.html @@ -109,7 +109,7 @@

      lib/jsdoc/request.jsdoc


      - Documentation generated by JSDoc 3.5.5 on Tue Nov 14 2017 02:39:47 GMT+0000 (UTC) using the Minami theme. + Documentation generated by JSDoc 3.5.5 on Wed Nov 15 2017 00:54:57 GMT+0000 (UTC) using the Minami theme.
      diff --git a/api/lib_jsdoc_response.jsdoc.html b/api/lib_jsdoc_response.jsdoc.html index b67e5dd141..27d4e1dae9 100644 --- a/api/lib_jsdoc_response.jsdoc.html +++ b/api/lib_jsdoc_response.jsdoc.html @@ -66,7 +66,7 @@

      lib/jsdoc/response.jsdoc


      - Documentation generated by JSDoc 3.5.5 on Tue Nov 14 2017 02:39:47 GMT+0000 (UTC) using the Minami theme. + Documentation generated by JSDoc 3.5.5 on Wed Nov 15 2017 00:54:57 GMT+0000 (UTC) using the Minami theme.
      diff --git a/api/lib_loader_agent_worker_loader.js.html b/api/lib_loader_agent_worker_loader.js.html index 5b0f697286..879747db6e 100644 --- a/api/lib_loader_agent_worker_loader.js.html +++ b/api/lib_loader_agent_worker_loader.js.html @@ -86,7 +86,7 @@

      lib/loader/agent_worker_loader.js


      - Documentation generated by JSDoc 3.5.5 on Tue Nov 14 2017 02:39:47 GMT+0000 (UTC) using the Minami theme. + Documentation generated by JSDoc 3.5.5 on Wed Nov 15 2017 00:54:57 GMT+0000 (UTC) using the Minami theme.
      diff --git a/api/lib_loader_app_worker_loader.js.html b/api/lib_loader_app_worker_loader.js.html index e7763a037e..cf3f8e8d5f 100644 --- a/api/lib_loader_app_worker_loader.js.html +++ b/api/lib_loader_app_worker_loader.js.html @@ -107,7 +107,7 @@

      lib/loader/app_worker_loader.js


      - Documentation generated by JSDoc 3.5.5 on Tue Nov 14 2017 02:39:47 GMT+0000 (UTC) using the Minami theme. + Documentation generated by JSDoc 3.5.5 on Wed Nov 15 2017 00:54:57 GMT+0000 (UTC) using the Minami theme.
      diff --git a/api/node_modules__egg-development@2.0.0@egg-development_agent.js.html b/api/node_modules__egg-development@2.0.0@egg-development_agent.js.html index c7866abbe4..94b95fc6a0 100644 --- a/api/node_modules__egg-development@2.0.0@egg-development_agent.js.html +++ b/api/node_modules__egg-development@2.0.0@egg-development_agent.js.html @@ -125,7 +125,7 @@

      node_modules/_egg-development@2.0.0@egg-development/agent
      - Documentation generated by JSDoc 3.5.5 on Tue Nov 14 2017 02:39:47 GMT+0000 (UTC) using the Minami theme. + Documentation generated by JSDoc 3.5.5 on Wed Nov 15 2017 00:54:57 GMT+0000 (UTC) using the Minami theme.
      diff --git a/api/node_modules__egg-development@2.0.0@egg-development_config_config.default.js.html b/api/node_modules__egg-development@2.0.0@egg-development_config_config.default.js.html index a754e2e91c..79f85c765e 100644 --- a/api/node_modules__egg-development@2.0.0@egg-development_config_config.default.js.html +++ b/api/node_modules__egg-development@2.0.0@egg-development_config_config.default.js.html @@ -77,7 +77,7 @@

      node_modules/_egg-development@2.0.0@egg-development/confi
      - Documentation generated by JSDoc 3.5.5 on Tue Nov 14 2017 02:39:47 GMT+0000 (UTC) using the Minami theme. + Documentation generated by JSDoc 3.5.5 on Wed Nov 15 2017 00:54:57 GMT+0000 (UTC) using the Minami theme.
      diff --git a/api/node_modules__egg-i18n@2.0.0@egg-i18n_app.js.html b/api/node_modules__egg-i18n@2.0.0@egg-i18n_app.js.html index f5f4870ceb..a510c41276 100644 --- a/api/node_modules__egg-i18n@2.0.0@egg-i18n_app.js.html +++ b/api/node_modules__egg-i18n@2.0.0@egg-i18n_app.js.html @@ -199,7 +199,7 @@

      node_modules/_egg-i18n@2.0.0@egg-i18n/app.js


      - Documentation generated by JSDoc 3.5.5 on Tue Nov 14 2017 02:39:47 GMT+0000 (UTC) using the Minami theme. + Documentation generated by JSDoc 3.5.5 on Wed Nov 15 2017 00:54:57 GMT+0000 (UTC) using the Minami theme.
      diff --git a/api/node_modules__egg-i18n@2.0.0@egg-i18n_app_extend_context.js.html b/api/node_modules__egg-i18n@2.0.0@egg-i18n_app_extend_context.js.html index 69a6477c05..f36f05fbaa 100644 --- a/api/node_modules__egg-i18n@2.0.0@egg-i18n_app_extend_context.js.html +++ b/api/node_modules__egg-i18n@2.0.0@egg-i18n_app_extend_context.js.html @@ -73,7 +73,7 @@

      node_modules/_egg-i18n@2.0.0@egg-i18n/app/extend/context.
      - Documentation generated by JSDoc 3.5.5 on Tue Nov 14 2017 02:39:47 GMT+0000 (UTC) using the Minami theme. + Documentation generated by JSDoc 3.5.5 on Wed Nov 15 2017 00:54:57 GMT+0000 (UTC) using the Minami theme.
      diff --git a/api/node_modules__egg-i18n@2.0.0@egg-i18n_config_config.default.js.html b/api/node_modules__egg-i18n@2.0.0@egg-i18n_config_config.default.js.html index 6e48bd87cb..f276e97332 100644 --- a/api/node_modules__egg-i18n@2.0.0@egg-i18n_config_config.default.js.html +++ b/api/node_modules__egg-i18n@2.0.0@egg-i18n_config_config.default.js.html @@ -89,7 +89,7 @@

      node_modules/_egg-i18n@2.0.0@egg-i18n/config/config.defau
      - Documentation generated by JSDoc 3.5.5 on Tue Nov 14 2017 02:39:47 GMT+0000 (UTC) using the Minami theme. + Documentation generated by JSDoc 3.5.5 on Wed Nov 15 2017 00:54:57 GMT+0000 (UTC) using the Minami theme.
      diff --git a/api/node_modules__egg-jsonp@2.0.0@egg-jsonp_app_extend_application.js.html b/api/node_modules__egg-jsonp@2.0.0@egg-jsonp_app_extend_application.js.html index 18b2b40792..a2ce6635cf 100644 --- a/api/node_modules__egg-jsonp@2.0.0@egg-jsonp_app_extend_application.js.html +++ b/api/node_modules__egg-jsonp@2.0.0@egg-jsonp_app_extend_application.js.html @@ -174,7 +174,7 @@

      node_modules/_egg-jsonp@2.0.0@egg-jsonp/app/extend/applic
      - Documentation generated by JSDoc 3.5.5 on Tue Nov 14 2017 02:39:47 GMT+0000 (UTC) using the Minami theme. + Documentation generated by JSDoc 3.5.5 on Wed Nov 15 2017 00:54:57 GMT+0000 (UTC) using the Minami theme.
      diff --git a/api/node_modules__egg-jsonp@2.0.0@egg-jsonp_app_extend_context.js.html b/api/node_modules__egg-jsonp@2.0.0@egg-jsonp_app_extend_context.js.html index 2bc554b2c5..f3174a521b 100644 --- a/api/node_modules__egg-jsonp@2.0.0@egg-jsonp_app_extend_context.js.html +++ b/api/node_modules__egg-jsonp@2.0.0@egg-jsonp_app_extend_context.js.html @@ -95,7 +95,7 @@

      node_modules/_egg-jsonp@2.0.0@egg-jsonp/app/extend/contex
      - Documentation generated by JSDoc 3.5.5 on Tue Nov 14 2017 02:39:47 GMT+0000 (UTC) using the Minami theme. + Documentation generated by JSDoc 3.5.5 on Wed Nov 15 2017 00:54:57 GMT+0000 (UTC) using the Minami theme.
      diff --git a/api/node_modules__egg-jsonp@2.0.0@egg-jsonp_config_config.default.js.html b/api/node_modules__egg-jsonp@2.0.0@egg-jsonp_config_config.default.js.html index d8a03742b6..bc9216184d 100644 --- a/api/node_modules__egg-jsonp@2.0.0@egg-jsonp_config_config.default.js.html +++ b/api/node_modules__egg-jsonp@2.0.0@egg-jsonp_config_config.default.js.html @@ -77,7 +77,7 @@

      node_modules/_egg-jsonp@2.0.0@egg-jsonp/config/config.def
      - Documentation generated by JSDoc 3.5.5 on Tue Nov 14 2017 02:39:47 GMT+0000 (UTC) using the Minami theme. + Documentation generated by JSDoc 3.5.5 on Wed Nov 15 2017 00:54:57 GMT+0000 (UTC) using the Minami theme.
      diff --git a/api/node_modules__egg-logrotator@3.0.0@egg-logrotator_config_config.default.js.html b/api/node_modules__egg-logrotator@3.0.0@egg-logrotator_config_config.default.js.html index 82562e8d0f..cfc001a34b 100644 --- a/api/node_modules__egg-logrotator@3.0.0@egg-logrotator_config_config.default.js.html +++ b/api/node_modules__egg-logrotator@3.0.0@egg-logrotator_config_config.default.js.html @@ -86,7 +86,7 @@

      node_modules/_egg-logrotator@3.0.0@egg-logrotator/config/
      - Documentation generated by JSDoc 3.5.5 on Tue Nov 14 2017 02:39:47 GMT+0000 (UTC) using the Minami theme. + Documentation generated by JSDoc 3.5.5 on Wed Nov 15 2017 00:54:57 GMT+0000 (UTC) using the Minami theme.
      diff --git a/api/node_modules__egg-multipart@2.0.0@egg-multipart_app_extend_context.js.html b/api/node_modules__egg-multipart@2.0.0@egg-multipart_app_extend_context.js.html index d6baa1ba71..892cc4a0b5 100644 --- a/api/node_modules__egg-multipart@2.0.0@egg-multipart_app_extend_context.js.html +++ b/api/node_modules__egg-multipart@2.0.0@egg-multipart_app_extend_context.js.html @@ -122,7 +122,7 @@

      node_modules/_egg-multipart@2.0.0@egg-multipart/app/exten
      - Documentation generated by JSDoc 3.5.5 on Tue Nov 14 2017 02:39:47 GMT+0000 (UTC) using the Minami theme. + Documentation generated by JSDoc 3.5.5 on Wed Nov 15 2017 00:54:57 GMT+0000 (UTC) using the Minami theme.
      diff --git a/api/node_modules__egg-multipart@2.0.0@egg-multipart_config_config.default.js.html b/api/node_modules__egg-multipart@2.0.0@egg-multipart_config_config.default.js.html index 63450cbe09..0adece384d 100644 --- a/api/node_modules__egg-multipart@2.0.0@egg-multipart_config_config.default.js.html +++ b/api/node_modules__egg-multipart@2.0.0@egg-multipart_config_config.default.js.html @@ -88,7 +88,7 @@

      node_modules/_egg-multipart@2.0.0@egg-multipart/config/co
      - Documentation generated by JSDoc 3.5.5 on Tue Nov 14 2017 02:39:47 GMT+0000 (UTC) using the Minami theme. + Documentation generated by JSDoc 3.5.5 on Wed Nov 15 2017 00:54:57 GMT+0000 (UTC) using the Minami theme.
      diff --git a/api/node_modules__egg-schedule@3.0.0@egg-schedule_app_extend_agent.js.html b/api/node_modules__egg-schedule@3.0.0@egg-schedule_app_extend_agent.js.html index c01f321978..b503fc7aa1 100644 --- a/api/node_modules__egg-schedule@3.0.0@egg-schedule_app_extend_agent.js.html +++ b/api/node_modules__egg-schedule@3.0.0@egg-schedule_app_extend_agent.js.html @@ -102,7 +102,7 @@

      node_modules/_egg-schedule@3.0.0@egg-schedule/app/extend/
      - Documentation generated by JSDoc 3.5.5 on Tue Nov 14 2017 02:39:47 GMT+0000 (UTC) using the Minami theme. + Documentation generated by JSDoc 3.5.5 on Wed Nov 15 2017 00:54:57 GMT+0000 (UTC) using the Minami theme.
      diff --git a/api/node_modules__egg-security@2.0.0@egg-security_app_extend_context.js.html b/api/node_modules__egg-security@2.0.0@egg-security_app_extend_context.js.html index 860c53e8dd..fd487daebe 100644 --- a/api/node_modules__egg-security@2.0.0@egg-security_app_extend_context.js.html +++ b/api/node_modules__egg-security@2.0.0@egg-security_app_extend_context.js.html @@ -218,7 +218,7 @@

      node_modules/_egg-security@2.0.0@egg-security/app/extend/
      - Documentation generated by JSDoc 3.5.5 on Tue Nov 14 2017 02:39:47 GMT+0000 (UTC) using the Minami theme. + Documentation generated by JSDoc 3.5.5 on Wed Nov 15 2017 00:54:57 GMT+0000 (UTC) using the Minami theme.
      diff --git a/api/node_modules__egg-security@2.0.0@egg-security_config_config.default.js.html b/api/node_modules__egg-security@2.0.0@egg-security_config_config.default.js.html index 969ddad40e..c2ff11c574 100644 --- a/api/node_modules__egg-security@2.0.0@egg-security_config_config.default.js.html +++ b/api/node_modules__egg-security@2.0.0@egg-security_config_config.default.js.html @@ -146,7 +146,7 @@

      node_modules/_egg-security@2.0.0@egg-security/config/conf
      - Documentation generated by JSDoc 3.5.5 on Tue Nov 14 2017 02:39:47 GMT+0000 (UTC) using the Minami theme. + Documentation generated by JSDoc 3.5.5 on Wed Nov 15 2017 00:54:57 GMT+0000 (UTC) using the Minami theme.
      diff --git a/api/node_modules__egg-session@3.0.0@egg-session_app_extend_application.js.html b/api/node_modules__egg-session@3.0.0@egg-session_app_extend_application.js.html index bcfa11a97e..f88d1add53 100644 --- a/api/node_modules__egg-session@3.0.0@egg-session_app_extend_application.js.html +++ b/api/node_modules__egg-session@3.0.0@egg-session_app_extend_application.js.html @@ -116,7 +116,7 @@

      node_modules/_egg-session@3.0.0@egg-session/app/extend/ap
      - Documentation generated by JSDoc 3.5.5 on Tue Nov 14 2017 02:39:47 GMT+0000 (UTC) using the Minami theme. + Documentation generated by JSDoc 3.5.5 on Wed Nov 15 2017 00:54:57 GMT+0000 (UTC) using the Minami theme.
      diff --git a/api/node_modules__egg-static@2.0.0@egg-static_config_config.default.js.html b/api/node_modules__egg-static@2.0.0@egg-static_config_config.default.js.html index a4053ce7f3..5733b06383 100644 --- a/api/node_modules__egg-static@2.0.0@egg-static_config_config.default.js.html +++ b/api/node_modules__egg-static@2.0.0@egg-static_config_config.default.js.html @@ -88,7 +88,7 @@

      node_modules/_egg-static@2.0.0@egg-static/config/config.d
      - Documentation generated by JSDoc 3.5.5 on Tue Nov 14 2017 02:39:47 GMT+0000 (UTC) using the Minami theme. + Documentation generated by JSDoc 3.5.5 on Wed Nov 15 2017 00:54:57 GMT+0000 (UTC) using the Minami theme.
      diff --git a/api/node_modules__egg-view@2.0.0@egg-view_app_extend_application.js.html b/api/node_modules__egg-view@2.0.0@egg-view_app_extend_application.js.html index 3ba78d0bbf..b70e68e656 100644 --- a/api/node_modules__egg-view@2.0.0@egg-view_app_extend_application.js.html +++ b/api/node_modules__egg-view@2.0.0@egg-view_app_extend_application.js.html @@ -78,7 +78,7 @@

      node_modules/_egg-view@2.0.0@egg-view/app/extend/applicat
      - Documentation generated by JSDoc 3.5.5 on Tue Nov 14 2017 02:39:47 GMT+0000 (UTC) using the Minami theme. + Documentation generated by JSDoc 3.5.5 on Wed Nov 15 2017 00:54:57 GMT+0000 (UTC) using the Minami theme.
      diff --git a/api/node_modules__egg-view@2.0.0@egg-view_app_extend_context.js.html b/api/node_modules__egg-view@2.0.0@egg-view_app_extend_context.js.html index c78c0f03e5..01f9c3dd66 100644 --- a/api/node_modules__egg-view@2.0.0@egg-view_app_extend_context.js.html +++ b/api/node_modules__egg-view@2.0.0@egg-view_app_extend_context.js.html @@ -107,7 +107,7 @@

      node_modules/_egg-view@2.0.0@egg-view/app/extend/context.
      - Documentation generated by JSDoc 3.5.5 on Tue Nov 14 2017 02:39:47 GMT+0000 (UTC) using the Minami theme. + Documentation generated by JSDoc 3.5.5 on Wed Nov 15 2017 00:54:57 GMT+0000 (UTC) using the Minami theme.
      diff --git a/api/node_modules__egg-view@2.0.0@egg-view_config_config.default.js.html b/api/node_modules__egg-view@2.0.0@egg-view_config_config.default.js.html index 7bbf7e0e59..7a0fa65977 100644 --- a/api/node_modules__egg-view@2.0.0@egg-view_config_config.default.js.html +++ b/api/node_modules__egg-view@2.0.0@egg-view_config_config.default.js.html @@ -83,7 +83,7 @@

      node_modules/_egg-view@2.0.0@egg-view/config/config.defau
      - Documentation generated by JSDoc 3.5.5 on Tue Nov 14 2017 02:39:47 GMT+0000 (UTC) using the Minami theme. + Documentation generated by JSDoc 3.5.5 on Wed Nov 15 2017 00:54:57 GMT+0000 (UTC) using the Minami theme.
      diff --git a/api/node_modules__egg-watcher@3.0.0@egg-watcher_config_config.default.js.html b/api/node_modules__egg-watcher@3.0.0@egg-watcher_config_config.default.js.html index cc0bf8f577..aa57d14b0d 100644 --- a/api/node_modules__egg-watcher@3.0.0@egg-watcher_config_config.default.js.html +++ b/api/node_modules__egg-watcher@3.0.0@egg-watcher_config_config.default.js.html @@ -77,7 +77,7 @@

      node_modules/_egg-watcher@3.0.0@egg-watcher/config/config
      - Documentation generated by JSDoc 3.5.5 on Tue Nov 14 2017 02:39:47 GMT+0000 (UTC) using the Minami theme. + Documentation generated by JSDoc 3.5.5 on Wed Nov 15 2017 00:54:57 GMT+0000 (UTC) using the Minami theme.
      diff --git a/api/node_modules_egg-core_lib_egg.js.html b/api/node_modules_egg-core_lib_egg.js.html index f251279293..cff426c7dd 100644 --- a/api/node_modules_egg-core_lib_egg.js.html +++ b/api/node_modules_egg-core_lib_egg.js.html @@ -429,7 +429,7 @@

      node_modules/egg-core/lib/egg.js


      - Documentation generated by JSDoc 3.5.5 on Tue Nov 14 2017 02:39:47 GMT+0000 (UTC) using the Minami theme. + Documentation generated by JSDoc 3.5.5 on Wed Nov 15 2017 00:54:57 GMT+0000 (UTC) using the Minami theme.
      diff --git a/api/node_modules_egg-core_lib_loader_context_loader.js.html b/api/node_modules_egg-core_lib_loader_context_loader.js.html index 3375a0cd8b..05e68da018 100644 --- a/api/node_modules_egg-core_lib_loader_context_loader.js.html +++ b/api/node_modules_egg-core_lib_loader_context_loader.js.html @@ -166,7 +166,7 @@

      node_modules/egg-core/lib/loader/context_loader.js


      - Documentation generated by JSDoc 3.5.5 on Tue Nov 14 2017 02:39:47 GMT+0000 (UTC) using the Minami theme. + Documentation generated by JSDoc 3.5.5 on Wed Nov 15 2017 00:54:57 GMT+0000 (UTC) using the Minami theme.
      diff --git a/api/node_modules_egg-core_lib_loader_egg_loader.js.html b/api/node_modules_egg-core_lib_loader_egg_loader.js.html index 79b8f9534e..b98bbfc920 100644 --- a/api/node_modules_egg-core_lib_loader_egg_loader.js.html +++ b/api/node_modules_egg-core_lib_loader_egg_loader.js.html @@ -483,7 +483,7 @@

      node_modules/egg-core/lib/loader/egg_loader.js


      - Documentation generated by JSDoc 3.5.5 on Tue Nov 14 2017 02:39:47 GMT+0000 (UTC) using the Minami theme. + Documentation generated by JSDoc 3.5.5 on Wed Nov 15 2017 00:54:57 GMT+0000 (UTC) using the Minami theme.
      diff --git a/api/node_modules_egg-core_lib_loader_file_loader.js.html b/api/node_modules_egg-core_lib_loader_file_loader.js.html index 163efd0a74..2dc16d4f2a 100644 --- a/api/node_modules_egg-core_lib_loader_file_loader.js.html +++ b/api/node_modules_egg-core_lib_loader_file_loader.js.html @@ -312,7 +312,7 @@

      node_modules/egg-core/lib/loader/file_loader.js


      - Documentation generated by JSDoc 3.5.5 on Tue Nov 14 2017 02:39:47 GMT+0000 (UTC) using the Minami theme. + Documentation generated by JSDoc 3.5.5 on Wed Nov 15 2017 00:54:57 GMT+0000 (UTC) using the Minami theme.
      diff --git a/api/node_modules_egg-core_lib_loader_mixin_config.js.html b/api/node_modules_egg-core_lib_loader_mixin_config.js.html index 884d4d2293..eb99ed98aa 100644 --- a/api/node_modules_egg-core_lib_loader_mixin_config.js.html +++ b/api/node_modules_egg-core_lib_loader_mixin_config.js.html @@ -171,7 +171,7 @@

      node_modules/egg-core/lib/loader/mixin/config.js


      - Documentation generated by JSDoc 3.5.5 on Tue Nov 14 2017 02:39:47 GMT+0000 (UTC) using the Minami theme. + Documentation generated by JSDoc 3.5.5 on Wed Nov 15 2017 00:54:57 GMT+0000 (UTC) using the Minami theme.
      diff --git a/api/node_modules_egg-core_lib_loader_mixin_controller.js.html b/api/node_modules_egg-core_lib_loader_mixin_controller.js.html index f215d69ed5..1fd8e93993 100644 --- a/api/node_modules_egg-core_lib_loader_mixin_controller.js.html +++ b/api/node_modules_egg-core_lib_loader_mixin_controller.js.html @@ -177,7 +177,7 @@

      node_modules/egg-core/lib/loader/mixin/controller.js


      - Documentation generated by JSDoc 3.5.5 on Tue Nov 14 2017 02:39:47 GMT+0000 (UTC) using the Minami theme. + Documentation generated by JSDoc 3.5.5 on Wed Nov 15 2017 00:54:57 GMT+0000 (UTC) using the Minami theme.
      diff --git a/api/node_modules_egg-core_lib_loader_mixin_custom.js.html b/api/node_modules_egg-core_lib_loader_mixin_custom.js.html index 79611d818f..ebde5f4819 100644 --- a/api/node_modules_egg-core_lib_loader_mixin_custom.js.html +++ b/api/node_modules_egg-core_lib_loader_mixin_custom.js.html @@ -97,7 +97,7 @@

      node_modules/egg-core/lib/loader/mixin/custom.js


      - Documentation generated by JSDoc 3.5.5 on Tue Nov 14 2017 02:39:47 GMT+0000 (UTC) using the Minami theme. + Documentation generated by JSDoc 3.5.5 on Wed Nov 15 2017 00:54:57 GMT+0000 (UTC) using the Minami theme.
      diff --git a/api/node_modules_egg-core_lib_loader_mixin_extend.js.html b/api/node_modules_egg-core_lib_loader_mixin_extend.js.html index 91f87a0f3e..65541c8f23 100644 --- a/api/node_modules_egg-core_lib_loader_mixin_extend.js.html +++ b/api/node_modules_egg-core_lib_loader_mixin_extend.js.html @@ -211,7 +211,7 @@

      node_modules/egg-core/lib/loader/mixin/extend.js


      - Documentation generated by JSDoc 3.5.5 on Tue Nov 14 2017 02:39:47 GMT+0000 (UTC) using the Minami theme. + Documentation generated by JSDoc 3.5.5 on Wed Nov 15 2017 00:54:57 GMT+0000 (UTC) using the Minami theme.
      diff --git a/api/node_modules_egg-core_lib_loader_mixin_middleware.js.html b/api/node_modules_egg-core_lib_loader_mixin_middleware.js.html index 0092f39768..aaa58692ba 100644 --- a/api/node_modules_egg-core_lib_loader_mixin_middleware.js.html +++ b/api/node_modules_egg-core_lib_loader_mixin_middleware.js.html @@ -170,7 +170,7 @@

      node_modules/egg-core/lib/loader/mixin/middleware.js


      - Documentation generated by JSDoc 3.5.5 on Tue Nov 14 2017 02:39:47 GMT+0000 (UTC) using the Minami theme. + Documentation generated by JSDoc 3.5.5 on Wed Nov 15 2017 00:54:57 GMT+0000 (UTC) using the Minami theme.
      diff --git a/api/node_modules_egg-core_lib_loader_mixin_plugin.js.html b/api/node_modules_egg-core_lib_loader_mixin_plugin.js.html index f3a2d0509c..16011d965c 100644 --- a/api/node_modules_egg-core_lib_loader_mixin_plugin.js.html +++ b/api/node_modules_egg-core_lib_loader_mixin_plugin.js.html @@ -446,7 +446,7 @@

      node_modules/egg-core/lib/loader/mixin/plugin.js


      - Documentation generated by JSDoc 3.5.5 on Tue Nov 14 2017 02:39:47 GMT+0000 (UTC) using the Minami theme. + Documentation generated by JSDoc 3.5.5 on Wed Nov 15 2017 00:54:57 GMT+0000 (UTC) using the Minami theme.
      diff --git a/api/node_modules_egg-core_lib_loader_mixin_router.js.html b/api/node_modules_egg-core_lib_loader_mixin_router.js.html index dd8be7208f..ee689d22e3 100644 --- a/api/node_modules_egg-core_lib_loader_mixin_router.js.html +++ b/api/node_modules_egg-core_lib_loader_mixin_router.js.html @@ -78,7 +78,7 @@

      node_modules/egg-core/lib/loader/mixin/router.js


      - Documentation generated by JSDoc 3.5.5 on Tue Nov 14 2017 02:39:47 GMT+0000 (UTC) using the Minami theme. + Documentation generated by JSDoc 3.5.5 on Wed Nov 15 2017 00:54:57 GMT+0000 (UTC) using the Minami theme.
      diff --git a/api/node_modules_egg-core_lib_loader_mixin_service.js.html b/api/node_modules_egg-core_lib_loader_mixin_service.js.html index 88f7f67d00..a0824f0a2a 100644 --- a/api/node_modules_egg-core_lib_loader_mixin_service.js.html +++ b/api/node_modules_egg-core_lib_loader_mixin_service.js.html @@ -86,7 +86,7 @@

      node_modules/egg-core/lib/loader/mixin/service.js


      - Documentation generated by JSDoc 3.5.5 on Tue Nov 14 2017 02:39:47 GMT+0000 (UTC) using the Minami theme. + Documentation generated by JSDoc 3.5.5 on Wed Nov 15 2017 00:54:57 GMT+0000 (UTC) using the Minami theme.
      diff --git a/api/node_modules_egg-core_lib_utils_base_context_class.js.html b/api/node_modules_egg-core_lib_utils_base_context_class.js.html index f278f1c9c8..92760256b9 100644 --- a/api/node_modules_egg-core_lib_utils_base_context_class.js.html +++ b/api/node_modules_egg-core_lib_utils_base_context_class.js.html @@ -100,7 +100,7 @@

      node_modules/egg-core/lib/utils/base_context_class.js

      - Documentation generated by JSDoc 3.5.5 on Tue Nov 14 2017 02:39:47 GMT+0000 (UTC) using the Minami theme. + Documentation generated by JSDoc 3.5.5 on Wed Nov 15 2017 00:54:57 GMT+0000 (UTC) using the Minami theme.
      diff --git a/api/node_modules_egg-core_lib_utils_index.js.html b/api/node_modules_egg-core_lib_utils_index.js.html index 35f60de853..6b061eb7c8 100644 --- a/api/node_modules_egg-core_lib_utils_index.js.html +++ b/api/node_modules_egg-core_lib_utils_index.js.html @@ -155,7 +155,7 @@

      node_modules/egg-core/lib/utils/index.js


      - Documentation generated by JSDoc 3.5.5 on Tue Nov 14 2017 02:39:47 GMT+0000 (UTC) using the Minami theme. + Documentation generated by JSDoc 3.5.5 on Wed Nov 15 2017 00:54:57 GMT+0000 (UTC) using the Minami theme.
      diff --git a/api/node_modules_egg-core_lib_utils_router.js.html b/api/node_modules_egg-core_lib_utils_router.js.html index adda474c36..2fc5ec46b4 100644 --- a/api/node_modules_egg-core_lib_utils_router.js.html +++ b/api/node_modules_egg-core_lib_utils_router.js.html @@ -383,7 +383,7 @@

      node_modules/egg-core/lib/utils/router.js


      - Documentation generated by JSDoc 3.5.5 on Tue Nov 14 2017 02:39:47 GMT+0000 (UTC) using the Minami theme. + Documentation generated by JSDoc 3.5.5 on Wed Nov 15 2017 00:54:57 GMT+0000 (UTC) using the Minami theme.
      diff --git a/en/core/unittest.html b/en/core/unittest.html new file mode 100644 index 0000000000..66b6f996fa --- /dev/null +++ b/en/core/unittest.html @@ -0,0 +1,272 @@ + + + + Unit Testing - Born to build better enterprise frameworks and apps + + + + + + + + + + + + +
      +
      +
      +

      Unit Testing

      +

      # Why Unit Testing

      +

      Let us start with a few questions:

      +
        +
      • How to measure the quality of code
      • +
      • How to ensure the quality of code
      • +
      • Are you free to refactor code
      • +
      • How to guarantee the correctness of refactored code
      • +
      • Have you confidence to release your untested code
      • +
      +

      If you are not sure, you probably need unit testing.

      +

      Actually, it brings us tremendous benefits:

      +
        +
      • ensurance of maintaining code quality
      • +
      • correct refactoring
      • +
      • enhanced confidence
      • +
      • automation
      • +
      +

      It's more important to use unit tests in a web application during the fast iteration, because each testing case can contribute to the increasing stability of the application. The result of various inputs in each test is definite, so it's obvious to detect whether the changed code has an impact on correctness or not.

      +

      Therefore, code, such as in Controller, Service, Helper, Extend and so on, require corresponding unit testing for quality assurances, especially modification of the framework or plugins, of which test coverage is strongly recommended to be 100%.

      +

      # Test Framework

      +

      When searching 'test framework' in npm, there are a mass of test frameworks owning their own unique characteristics.

      +

      # Mocha

      +

      Mocha is our first choice.

      +
      +

      Mocha is a feature-rich JavaScript test framework running on Node.js and in the browser, making asynchronous testing simple and fun. Mocha tests run serially, allowing for flexible and accurate reporting, while mapping uncaught exceptions to the correct test cases.

      +
      +

      And it's more efficient to use together with another co-mocha module, which provides many advanced features, such as generator function, async and await.

      +

      # AVA

      +

      Why not another recently popular framework AVA which looks like faster? AVA is great, but practice of serveral projects tells us the truth that code is harder to write.

      +

      Comments from @dead-horse:

      +
      +
        +
      • AVA is not stable enough, for example, CPU capacity is going to be overloaded when plenty of files are running concurrently. The solution of setting parameter controlling concurrent could work, but 'only mode' would be not functioning any more.
      • +
      • Running cases concurrently makes great demands on implementation, because each test has to be independent, especially containing mock.
      • +
      • Considering the expensive initialization of app, it's irrational of AVA to execute each file in an independent process initializing their own app while serial framework does only one time.
      • +
      +
      +

      Comments from @fool2fish

      +
      +
        +
      • It's faster to use AVA in simple application(maybe too simple to judge). But it's not recommended to use in complicate one because of its considerable flaws, such as incapability of offering accurate error stacks; meanwhile, concurrency may cause service relying on other test settings to hang up which reduces the success rate of the test. Therefore, process testing, for example, CRUD operations of database, should not use AVA.
      • +
      +
      +

      # Assertion Library

      +

      Assertion libraries, as flourishing as test frameworks, are emerged continuously. The one we used has changed from assert to should, and then to expect +, but we are still trying to find better one.

      +

      In the end, we go back to the original assertion library because of the appearance of power-assert, which best expresses 『No API is the best API』.

      +

      To be Short, Here are it's advantages:

      +
        +
      • No API is the best API. Assert is all.
      • +
      • ** powerful failure message **
      • +
      • ** powerful failure message **
      • +
      • ** powerful failure message **
      • +
      +

      You may intentionally make mistakes in order to see these failure messages. +

      +

      # Test Rule

      +

      Framework defines some fundamental rules on unit testing to keep us forcus on coding rather than assistant work, such as how to execute test cases.

      +

      # Directory Structure

      +

      Test code is demand to be put in test directory, include fixtures and assistant scripts.

      +

      Each Test file has to be named by the pattern of ${filename}.test.js, ending with .test.js.

      +

      For example:

      +
      test
      ├── controller
      │   └── home.test.js
      ├── hello.test.js
      └── service
      └── user.test.js
      +

      # Test Tool

      +

      Consistently using egg-bin to launch tests , which automaticlly load modules like mocha, co-mocha, power-assert, istanbul into test scripts, so that we can ** concentrate on writing tests ** without wasting time on the choice of various test tools or modules.

      +

      The only thing you need to do is setting scripts.test in package.json.

      +
      {
      "scripts": {
      "test": "egg-bin test"
      }
      }
      +

      Then tests would be launched by executing npm test command.

      +
      npm test

      > unittest-example@ test /Users/mk2/git/github.com/eggjs/examples/unittest
      > egg-bin test

      test/hello.test.js
      ✓ should work

      1 passing (10ms)
      +

      # Test Preparation

      +

      This chapter introduces you how to write test, and introduction of tests for the framework and plugins are located in framework and plugin.

      +

      # mock

      +

      Generally, a complete application test requires initialization and cleanup, such as deleting temporary files or destroy application. Also, we have to deal with exceptional situations like network problem and inaccessible of server.

      +

      We extracted an egg-mockmodule for mock, help for quick implementation of application unit tests, supporting fast creation of ctx to test.

      +

      # app

      +

      Before lauching, we have to create an instance of App to test code of application-level like Controller, Middleware or Service.

      +

      We can easily create one at Mocha's hook, before, through egg-mock.

      +
      // test/controller/home.test.js
      const assert = require('assert');
      const mock = require('egg-mock');

      describe('test/controller/home.test.js', () => {
      let app;
      before(() => {
      // create an current app instance
      app = mock.app();
      // execute tests after app is ready
      return app.ready();
      });
      });
      +

      Now, we have an app instance, and it's the base of all the following tests. See more about app at mock.app(options).

      +

      It's redundancy to create an instance in each test file, so we offered an bootstrap file in egg-mock to create it conveniently.

      +
      // test/controller/home.test.js
      const { app, mock, assert } = require('egg-mock/bootstrap');

      describe('test/controller/home.test.js', () => {
      // test cases
      });
      +

      # ctx

      +

      Except app, tests for Extend, Service and Helper are also taken into consideration. Let's ceate a context through app.mockContext(options) offered by egg-mock.

      +
      it('should get a ctx', () => {
      const ctx = app.mockContext();
      assert(ctx.method === 'GET');
      assert(ctx.url === '/');
      });
      +

      To mock data on context is also supported.

      +
      it('should mock ctx.user', () => {
      const ctx = app.mockContext({
      user: {
      name: 'fengmk2',
      },
      });
      assert(ctx.user);
      assert(ctx.user.name === 'fengmk2');
      });
      +

      Since we have got the app and the context, you are free to do a lot of tests.

      +

      # Testing Order

      +

      Pay close attention to testing order, and make sure any chunk of code is executed as you expected.

      +

      Common Error:

      +
      // Bad
      const { app } = require('egg-mock/bootstrap');

      describe('bad test', () => {
      doSomethingBefore();

      it('should redirect', () => {
      return app.httpRequest()
      .get('/')
      .expect(302);
      });
      });
      +

      Mocha is going to load all the code in the beginning, which means doSomethingBefore would be invoked before execution. It's not expected when especially using 'only' to specify the test.

      +

      It's supposed to locate in a before hook in the suite of a particular test case.

      +
      // Good
      const { app } = require('egg-mock/bootstrap');

      describe('good test', () => {
      before(() => doSomethingBefore());

      it('should redirect', () => {
      return app.httpRequest()
      .get('/')
      .expect(302);
      });
      });
      +

      Mocha have keywords - before, after, beforeEach and afterEach - to set up preconditions and clean-up after your tests. These keywords could be multiple and execute in strict order.

      +

      # Asynchronous Test

      +

      egg-bin is going to load co-mocha module automaticlly to support asynchronous test, no matter how to implement, such as Promise returned by app.httpRequest mentioned above.

      +
      // return Promise
      it('should redirect', () => {
      return app.httpRequest()
      .get('/')
      .expect(302);
      });

      // using callback
      it('should redirect', done => {
      app.httpRequest()
      .get('/')
      .expect(302, done);
      });

      // return generator
      it('should redirect', function* () {
      yield app.httpRequest()
      .get('/')
      .expect(302);
      });
      +

      According to specific situation, you could make different choice of these ways. Multiple asynchronous test cases could be composed to one test, or divided into several independent tests.

      +

      # Controller Test

      +

      It's the tough part of all application tests, since it's closely related to router configuration. app.httpRequest() returns actually an instance of SuperTest, which connects Router and Controller, using to load a real request. It could also help us to examine param verification of Router by loading boundary conditions.

      +

      Here is an app/controller/home.js example.

      +
      // app/router.js
      module.exports = app => {
      app.get('homepage', '/', 'home.index');
      };

      // app/controller/home.js
      exports.index = function* (ctx) {
      ctx.body = 'hello world';
      };
      +

      Then a test.

      +
      // test/controller/home.test.js
      const { app, mock, assert } = require('egg-mock/bootstrap');

      describe('test/controller/home.test.js', () => {
      describe('GET /', () => {
      it('should status 200 and get the body', () => {
      // load `GET /` request
      return app.httpRequest()
      .get('/')
      .expect(200) // set expectaion of status to 200
      .expect('hello world'); // set expectaion of body to 'hello world'
      });

      it('should send multi requests', function* () {
      // one test could contains multiple request test cases that were yield
      yield app.httpRequest()
      .get('/')
      .expect(200) v
      .expect('hello world'); // set expectaion of body to 'hello world'

      // once more
      const result = yield app.httpRequest()
      .get('/')
      .expect(200)
      .expect('hello world');

      // varify via assert
      assert(result.status === 200);
      });
      });
      });
      +

      app.httpRequest based on SuperTest supports a majority of HTTP methods, and it provides rich interfaces to construct request, such as a JSON POST request.

      +
      // app/controller/home.js
      exports.post = function* (ctx) {
      ctx.body = ctx.request.body;
      };

      // test/controller/home.test.js
      it('should status 200 and get the request body', () => {
      // mock CSRF token,explain later
      app.mockCsrf();
      return app.httpRequest()
      .post('/post')
      .type('form')
      .send({
      foo: 'bar',
      })
      .expect(200)
      .expect({
      foo: 'bar',
      });
      });
      +

      See details at SuperTest Document

      +

      # mock CSRF

      +

      The security plugin of framework would enable CSRF prevention as default. Typically, tests have to precede with a request of page in order to parse CSRF token from the response, and then use the token in later POST requests. But egg-mock provides the app.mockCsrf() function to skip the verifiation of the CSRF token of requests sent by SuperTest.

      +
      app.mockCsrf();
      return app.httpRequest()
      .post('/post')
      .type('form')
      .send({
      foo: 'bar',
      })
      .expect(200)
      .expect({
      foo: 'bar',
      });
      +

      # Service Test

      +

      Service is easier to test than Controller. Creating a ctx, and then get the instance of Service via ctx.service.${serviceName}, and then use the instance to test.

      +

      For example, app/service/user.js:

      +
      module.exports = app => {
      return class User extends app.Service {
      * get(name) {
      return yield userDatabase.get(name);
      }
      };
      };
      +

      And a test:

      +
      describe('get()', () => {
      // using generator function because of asynchronous invoking
      it('should get exists user', function* () {
      // create ctx
      const ctx = app.mockContext();
      // get service.user via ctx
      const user = yield ctx.service.user.get('fengmk2');
      assert(user);
      assert(user.name === 'fengmk2');
      });

      it('should get null when user not exists', function* () {
      const ctx = app.mockContext();
      const user = yield ctx.service.user.get('fengmk1');
      assert(!user);
      });
      });
      +

      Of cause it's just a sample, acutal code would probably be more complicated.

      +

      # Extend Test

      +

      It's extendable of Application, Request, Response and Context as well as Helper, and we are able to write specific test cases for extended functions or properties.

      +

      # Application

      +

      When an app instance is created by egg-mock, the extended functions and properties are already available on the instance and can be tested directly.

      +

      For example, we extend the application in app/extend/application to support cache based on ylru.

      +
      const LRU = Symbol('Application#lru');
      const LRUCache = require('ylru');
      module.exports = {
      get lru() {
      if (!this[LRU]) {
      this[LRU] = new LRUCache(1000);
      }
      return this[LRU];
      },
      };
      +

      A corresponding test:

      +
      describe('get lru', () => {
      it('should get a lru and it work', () => {
      // set cache
      app.lru.set('foo', 'bar');
      // get cache
      assert(app.lru.get('foo') === 'bar');
      });
      });
      +

      As you can see, it's easy.

      +

      # Context

      +

      Compared to Application, you need only one more step for Context tests, which is to create an Context instance via app.mockContext.

      +

      Such as adding a property named isXHR to app/extend/context.js to present whether or not the request was submitted via XMLHttpRequest.

      +
      module.exports = {
      get isXHR() {
      return this.get('X-Requested-With') === 'XMLHttpRequest';
      },
      };
      +

      A corresponding test:

      +
      describe('isXHR()', () => {
      it('should true', () => {
      const ctx = app.mockContext({
      headers: {
      'X-Requested-With': 'XMLHttpRequest',
      },
      });
      assert(ctx.isXHR === true);
      });

      it('should false', () => {
      const ctx = app.mockContext({
      headers: {
      'X-Requested-With': 'SuperAgent',
      },
      });
      assert(ctx.isXHR === false);
      });
      });
      +

      # Request

      +

      Extended properties and function are available on ctx.request, so they can be tested directly.

      +

      For example, provide a isChrome property to app/extend/request.js to varify requests whether they are from Chrome or not.

      +
      const IS_CHROME = Symbol('Request#isChrome');
      module.exports = {
      get isChrome() {
      if (!this[IS_CHROME]) {
      const ua = this.get('User-Agent').toLowerCase();
      this[IS_CHROME] = ua.includes('chrome/');
      }
      return this[IS_CHROME];
      },
      };
      +

      A corresponding test:

      +
      describe('isChrome()', () => {
      it('should true', () => {
      const ctx = app.mockContext({
      headers: {
      'User-Agent': 'Chrome/56.0.2924.51',
      },
      });
      assert(ctx.request.isChrome === true);
      });

      it('should false', () => {
      const ctx = app.mockContext({
      headers: {
      'User-Agent': 'FireFox/1',
      },
      });
      assert(ctx.request.isChrome === false);
      });
      });
      +

      # Response

      +

      Identical with Request, Response test could be based on ctx.reponse directly, accessing all the extended functions and properties.

      +

      For example, provide an isSuccess property to indicate current status code equal to 200 or not.

      +
      module.exports = {
      get isSuccess() {
      return this.status === 200;
      },
      };
      +

      The corresponding test:

      +
      describe('isSuccess()', () => {
      it('should true', () => {
      const ctx = app.mockContext();
      ctx.status = 200;
      assert(ctx.response.isSuccess === true);
      });

      it('should false', () => {
      const ctx = app.mockContext();
      ctx.status = 404;
      assert(ctx.response.isSuccess === false);
      });
      });
      +

      # Helper

      +

      Similiar to Service, Helper is avaliable on ctx, which can be tested directly.

      +

      Such as app/helper/format.js:

      +
      module.exports = {
      money(val) {
      const lang = this.ctx.get('Accept-Language');
      if (lang.includes('zh-CN')) {
      return `¥ ${val}`;
      }
      return `$ ${val}`;
      },
      };
      +

      A corresponding test:

      +
      describe('money()', () => {
      it('should RMB', () => {
      const ctx = app.mockContext({
      // mock headers of ctx
      headers: {
      'Accept-Language': 'zh-CN,zh;q=0.5',
      },
      });
      assert(ctx.helper.money(100) === '¥ 100');
      });

      it('should US Dolar', () => {
      const ctx = app.mockContext();
      assert(ctx.helper.money(100) === '$ 100');
      });
      });
      +

      # Mock Function

      +

      Except functions mentioned above, like app.mockContext() and app.mockCsrf(), egg-mock provides quite a few mocking functions to make writing tests easier.

      +
        +
      • To prevent console logs through mock.consoleLevel('NONE')
      • +
      • To mock session data through app.mockSession(data)
      • +
      +
      describe('GET /session', () => {
      it('should mock session work', () => {
      app.mockSession({
      foo: 'bar',
      uid: 123,
      });
      return app.httpRequest()
      .get('/session')
      .expect(200)
      .expect({
      session: {
      foo: 'bar',
      uid: 123,
      },
      });
      });
      });
      +

      Remember to restore mock data in an afterEach hook, otherwise it would take effect with all the tests that supposed to be independent to each other.

      +

      When you required egg-mock/bootstrap, resetting work would be done automaticly in an afterEach hook. Do not write these code any more.

      +

      The following will describe the common usage of egg-mock.

      +

      # Mock Properties And Functions

      +

      Egg-mock extended from mm moudle contains full features of it, so we can directly mock any objects' properties and functions.

      +

      # Mock Properties

      +

      Mock app.config.baseDir to return a given value - /tmp/mockapp.

      +
      mock(app.config, 'baseDir', '/tmp/mockapp');
      assert(app.config.baseDir === '/tmp/mockapp');
      +

      # Mock Functions

      +

      Mock fs.readFileSync to return a given function.

      +
      mock(fs, 'readFileSync', filename => {
      return 'hello world';
      });
      assert(fs.readFileSync('foo.txt') === 'hello world');
      +

      See more detail in mm API, include advanced usage like mock.data()mock.error() and so on.

      +

      # Mock Service

      +

      Service, a standard built-in member of the framework, is offered a specialized function to conveniently mock its result, which is app.mockService(service, methodName, fn).

      +

      For example, mock the method get(name) in app/service/user to return a nonexistent user.

      +
      it('should mock fengmk1 exists', () => {
      app.mockService('user', 'get', function* () {
      return {
      name: 'fengmk1',
      };
      });

      return app.httpRequest()
      .get('/user?name=fengmk1')
      .expect(200)
      // return an originally nonexistent user
      .expect({
      name: 'fengmk1',
      });
      });
      +

      Using app.mockServiceError(service, methodName, error) to mock exception.

      +

      For example, mock the method get(name) in app/service/user to throw an exception.

      +
      it('should mock service error', () => {
      app.mockServiceError('user', 'get', 'mock user service error');
      return app.httpRequest()
      .get('/user?name=fengmk2')
      // service exception causing the 500 status code
      .expect(500)
      .expect(/mock user service error/);
      });
      +

      # Mock HttpClient

      +

      External HTTP requests should be performed though HttpClient, a built-in member of Egg, and app.mockHttpclient(url, method, data) is able to simulate various network exceptions of requests performed by app.curl and ctx.curl.

      +

      For example, we submit a request in app/controller/home.js.

      +
      exports.httpclient = function* (ctx) {
      const res = ctx.curl('https://eggjs.org');
      ctx.body = res.data.toString();
      };
      +

      Then mock it's response.

      +
      describe('GET /httpclient', () => {
      it('should mock httpclient response', () => {
      app.mockHttpclient('https://eggjs.org', {
      // parameter allowed to be a buffer / string / json,
      // will be finally converted to buffer
      // according to options.dataType
      data: 'mock eggjs.org response',
      });
      return app.httpRequest()
      .get('/httpclient')
      .expect('mock eggjs.org response');
      });
      });
      +

      # Sample Code

      +

      All sample code can be found in eggjs/exmaples/unittest

      + +
      + + + +
      + +
      + + + +
      + +
      + +