Skip to content

Commit

Permalink
docs: remove api that is from egg-rest (#1022)
Browse files Browse the repository at this point in the history
  • Loading branch information
popomore authored and dead-horse committed Jun 9, 2017
1 parent 057bc47 commit 1b108a7
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 82 deletions.
69 changes: 0 additions & 69 deletions lib/jsdoc/context.jsdoc
Original file line number Diff line number Diff line change
Expand Up @@ -40,72 +40,3 @@
*
* 每页资源数目,如 `GET /api/users?per_page=20` => `20`
*/

/**
* 设置返回资源对象
* @member {Object} Context#data=
* @example
* ```js
* ctx.data = {
* id: 1,
* name: 'fengmk2'
* };
* ```
*
* 会返回 200 响应
*
* ```js
* HTTP/1.1 200 OK
*
* {
* "data": {
* "id": 1,
* "name": "fengmk2"
* }
* }
* ```
*/

/**
* 设置 meta 响应数据
* @member {Object} Context#meta=
* @example
* ```js
* ctx.meta = {
* count: 100
* };
*
* ctx.data = [
* {
* id: 1,
* title: 'post title 1'
* },
* {
* id: 2,
* title: 'post title 2'
* }
* ];
* ```
*
* 会返回 200 响应
*
* ```js
* HTTP/1.1 200 OK
*
* {
* "meta": {
* "count": 100
* }
* "data": [
* {
* "id": 1,
* "title": 'post title 1'
* },
* {
* "id": 2,
* "title": 'post title 2'
* }
* ]
* }
* ```
*/
13 changes: 0 additions & 13 deletions test/lib/plugins/development.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ const path = require('path');
const request = require('supertest');
const pedding = require('pedding');
const mm = require('egg-mock');
const sleep = require('mz-modules/sleep');
const utils = require('../../utils');

describe('test/lib/plugins/development.test.js', () => {
Expand Down Expand Up @@ -66,17 +65,5 @@ describe('test/lib/plugins/development.test.js', () => {
fs.writeFileSync(filepath, body);
});

it('should reload when file changed', function* () {
fs.writeFileSync(filepath, 'module.exports = function*() { this.body = \'change\'; };');
// wait for app worker restart

yield sleep(10000);

yield request(app.callback())
.get('/')
.expect('change');

app.expect('stdout', /app_worker#2:\d+ started/);
});
});
});

0 comments on commit 1b108a7

Please sign in to comment.