egg-boilerplate-simple
Advanced tools
Comparing version 2.4.1 to 2.5.0
@@ -7,12 +7,11 @@ { | ||
"dependencies": { | ||
"egg": "^1.0.0" | ||
"egg": "^1.1.0" | ||
}, | ||
"devDependencies": { | ||
"autod": "^2.7.1", | ||
"egg-bin": "^3.1.0", | ||
"egg-ci": "^1.5.0", | ||
"egg-mock": "^3.2.0", | ||
"eslint": "^3.18.0", | ||
"autod": "^2.8.0", | ||
"egg-bin": "^3.3.0", | ||
"egg-ci": "^1.6.0", | ||
"egg-mock": "^3.4.0", | ||
"eslint": "^3.19.0", | ||
"eslint-config-egg": "^3.2.0", | ||
"supertest": "^3.0.0", | ||
"webstorm-disable-index": "^1.1.2" | ||
@@ -19,0 +18,0 @@ }, |
@@ -18,3 +18,2 @@ 'use strict'; | ||
'eslint-config-egg', | ||
'supertest', | ||
'webstorm-disable-index', | ||
@@ -21,0 +20,0 @@ ], |
'use strict'; | ||
const mm = require('egg-mock'); | ||
const assert = require('assert'); | ||
describe('test/app/controller/home.test.js', () => { | ||
it('should app auto init on setup.js', () => { | ||
// app is auto init at `test/.setup.js` | ||
assert(app); | ||
assert(mock); | ||
// mock alias | ||
assert(mm); | ||
assert(request); | ||
let app; | ||
before(() => { | ||
app = mm.app(); | ||
return app.ready(); | ||
}); | ||
afterEach(mm.restore); | ||
after(() => app.close()); | ||
it('should assert', () => { | ||
const pkg = require('../../../package.json'); | ||
assert(app.config.keys.startsWith(pkg.name)); | ||
}); | ||
it('should GET /', () => { | ||
return request(app.callback()) | ||
return app.httpRequest() | ||
.get('/') | ||
@@ -16,0 +23,0 @@ .expect('hi, egg') |
2.5.0 / 2017-04-19 | ||
================== | ||
* test: use app.httpRequest (#29) | ||
* feat: remove .setup.js (#28) | ||
2.4.1 / 2017-03-31 | ||
@@ -3,0 +9,0 @@ ================== |
{ | ||
"name": "egg-boilerplate-simple", | ||
"version": "2.4.1", | ||
"version": "2.5.0", | ||
"description": "boilerplate for egg quickstart", | ||
@@ -24,8 +24,8 @@ "scripts": { | ||
"devDependencies": { | ||
"autod": "^2.7.1", | ||
"egg-ci": "^1.5.0", | ||
"autod": "^2.8.0", | ||
"egg-ci": "^1.6.0", | ||
"egg-init": "^1.8.1", | ||
"eslint": "^3.18.0", | ||
"eslint": "^3.19.0", | ||
"eslint-config-egg": "^3.2.0", | ||
"npminstall": "^2.26.4", | ||
"npminstall": "^2.29.1", | ||
"webstorm-disable-index": "^1.1.2" | ||
@@ -32,0 +32,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
12043
25
93