From 9671add57d51d276f34eab898bd661e2be07f95a Mon Sep 17 00:00:00 2001 From: jongleberry Date: Sat, 25 Feb 2017 00:05:25 -0600 Subject: [PATCH] test: remove babel tests as they are no longer needed in node v7.6 --- Makefile | 3 +-- package.json | 3 --- test/babel/_test.js | 42 ------------------------------------------ test/babel/index.js | 8 -------- 4 files changed, 1 insertion(+), 55 deletions(-) delete mode 100644 test/babel/_test.js delete mode 100644 test/babel/index.js diff --git a/Makefile b/Makefile index 5c2428e..85710b6 100644 --- a/Makefile +++ b/Makefile @@ -5,8 +5,7 @@ REQUIRED = --require should --require should-http TESTS = test/application/* \ test/context/* \ test/request/* \ - test/response/* \ - test/babel/index.js + test/response/* lint: @./node_modules/.bin/eslint benchmarks lib test diff --git a/package.json b/package.json index 77ea1d1..5f2d7e0 100644 --- a/package.json +++ b/package.json @@ -47,9 +47,6 @@ "tag": "next" }, "devDependencies": { - "babel-eslint": "^6.0.0", - "babel-plugin-transform-async-to-generator": "^6.0.14", - "babel-register": "^6.9.0", "eslint": "^2.5.3", "eslint-config-standard": "^5.1.0", "eslint-plugin-babel": "^3.1.0", diff --git a/test/babel/_test.js b/test/babel/_test.js deleted file mode 100644 index d4b3460..0000000 --- a/test/babel/_test.js +++ /dev/null @@ -1,42 +0,0 @@ -'use strict'; - -const request = require('supertest'); -const Koa = require('../..'); - -describe('require("babel-core/register")', () => { - describe('app.use(fn)', () => { - it('should compose middleware w/ async functions', done => { - const app = new Koa(); - const calls = []; - - app.use(async (ctx, next) => { - calls.push(1); - await next(); - calls.push(6); - }); - - app.use(async (ctx, next) => { - calls.push(2); - await next(); - calls.push(5); - }); - - app.use(async (ctx, next) => { - calls.push(3); - await next(); - calls.push(4); - }); - - const server = app.listen(); - - request(server) - .get('/') - .expect(404) - .end(err => { - if (err) return done(err); - calls.should.eql([1, 2, 3, 4, 5, 6]); - done(); - }); - }); - }); -}); diff --git a/test/babel/index.js b/test/babel/index.js deleted file mode 100644 index 51954b0..0000000 --- a/test/babel/index.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict'; - -// http://babeljs.io/docs/setup/#babel_register - -require('babel-register')({ - plugins: ['transform-async-to-generator'] -}); -require('./_test.js');