⬆️ babel and use async arrow functions

This commit is contained in:
jongleberry 2015-11-05 08:49:20 -08:00
parent 09ada29881
commit a6547bcbce
2 changed files with 5 additions and 3 deletions

View file

@ -19,6 +19,8 @@
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"accepts": "^1.2.2", "accepts": "^1.2.2",
"babel-core": "^6.1.2",
"babel-preset-stage-3": "^6.1.2",
"content-disposition": "~0.5.0", "content-disposition": "~0.5.0",
"content-type": "^1.0.0", "content-type": "^1.0.0",
"cookies": "~0.5.0", "cookies": "~0.5.0",

View file

@ -9,19 +9,19 @@ describe('require("babel-core/register")', () => {
const app = new Koa(); const app = new Koa();
const calls = []; const calls = [];
app.use(async function (ctx, next){ app.use(async (ctx, next) => {
calls.push(1); calls.push(1);
await next(); await next();
calls.push(6); calls.push(6);
}); });
app.use(async function (ctx, next){ app.use(async (ctx, next) => {
calls.push(2); calls.push(2);
await next(); await next();
calls.push(5); calls.push(5);
}); });
app.use(async function (ctx, next){ app.use(async (ctx, next) => {
calls.push(3); calls.push(3);
await next(); await next();
calls.push(4); calls.push(4);