From a6547bcbceed91af78a95ab8b11dd31f21566b4e Mon Sep 17 00:00:00 2001 From: jongleberry Date: Thu, 5 Nov 2015 08:49:20 -0800 Subject: [PATCH] :arrow_up: babel and use async arrow functions --- package.json | 2 ++ test/babel/_test.js | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 84c6150..1310b2f 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,8 @@ "license": "MIT", "dependencies": { "accepts": "^1.2.2", + "babel-core": "^6.1.2", + "babel-preset-stage-3": "^6.1.2", "content-disposition": "~0.5.0", "content-type": "^1.0.0", "cookies": "~0.5.0", diff --git a/test/babel/_test.js b/test/babel/_test.js index 6459c49..d4b3460 100644 --- a/test/babel/_test.js +++ b/test/babel/_test.js @@ -9,19 +9,19 @@ describe('require("babel-core/register")', () => { const app = new Koa(); const calls = []; - app.use(async function (ctx, next){ + app.use(async (ctx, next) => { calls.push(1); await next(); calls.push(6); }); - app.use(async function (ctx, next){ + app.use(async (ctx, next) => { calls.push(2); await next(); calls.push(5); }); - app.use(async function (ctx, next){ + app.use(async (ctx, next) => { calls.push(3); await next(); calls.push(4);