From 7df25774f00a1031ca4daad2878a17e0539072a2 Mon Sep 17 00:00:00 2001 From: fengmk2 Date: Wed, 11 Jul 2018 21:06:09 +0800 Subject: [PATCH] test: run test on node 10 (#63) --- .autod.conf | 2 ++ .travis.yml | 3 +-- appveyor.yml | 3 +-- benchmark/proxy.js | 12 +----------- package.json | 12 ++++++------ test/agent.test.js | 18 +++++++++--------- 6 files changed, 20 insertions(+), 30 deletions(-) diff --git a/.autod.conf b/.autod.conf index f33538c..ae55eee 100644 --- a/.autod.conf +++ b/.autod.conf @@ -20,5 +20,7 @@ module.exports = { ], semver: [ 'egg-bin@1', + 'eslint@4', + 'eslint-config-egg@6', ], }; diff --git a/.travis.yml b/.travis.yml index 4a1bf61..9edb713 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,11 +1,10 @@ sudo: false language: node_js node_js: - - '4.3.2' - '4' - '6' - '8' - - '9' + - '10' install: - npm i npminstall && npminstall script: diff --git a/appveyor.yml b/appveyor.yml index 181ac89..d3108c3 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,10 +1,9 @@ environment: matrix: - - nodejs_version: '4.3.2' - nodejs_version: '4' - nodejs_version: '6' - nodejs_version: '8' - - nodejs_version: '9' + - nodejs_version: '10' install: - ps: Install-Product node $env:nodejs_version diff --git a/benchmark/proxy.js b/benchmark/proxy.js index d9bbb74..f5c8b60 100644 --- a/benchmark/proxy.js +++ b/benchmark/proxy.js @@ -1,14 +1,4 @@ -/*! - * agentkeepalive - benchmark/proxy.js - * Copyright(c) 2012 fengmk2 - * MIT Licensed - */ - -"use strict"; - -/** - * Module dependencies. - */ +'use strict'; var http = require('http'); var AgentKeepalive = require('../'); diff --git a/package.json b/package.json index d297c59..dfaf300 100644 --- a/package.json +++ b/package.json @@ -34,18 +34,18 @@ "humanize-ms": "^1.2.1" }, "devDependencies": { - "autod": "^2.8.0", - "egg-bin": "^1.10.3", - "egg-ci": "^1.7.0", - "eslint": "^3.19.0", - "eslint-config-egg": "^4.2.0", + "autod": "^3.0.1", + "egg-bin": "^1.11.1", + "egg-ci": "^1.8.0", + "eslint": "^4.19.1", + "eslint-config-egg": "^6.0.0", "pedding": "^1.1.0" }, "engines": { "node": ">= 4.0.0" }, "ci": { - "version": "4.3.2, 4, 6, 8, 9" + "version": "4, 6, 8, 10" }, "author": "fengmk2 (https://fengmk2.com)", "license": "MIT" diff --git a/test/agent.test.js b/test/agent.test.js index 4b3f455..9e883ca 100644 --- a/test/agent.test.js +++ b/test/agent.test.js @@ -938,10 +938,10 @@ describe('test/agent.test.js', () => { }, () => { throw new Error('should not run this'); }) - .on('error', () => { - assert(agentkeepalive.sockets[name].length === 1); - done(); - }); + .on('error', () => { + assert(agentkeepalive.sockets[name].length === 1); + done(); + }); http.get({ agent: agentkeepalive, @@ -950,9 +950,9 @@ describe('test/agent.test.js', () => { }, () => { throw new Error('should not run this'); }) - .on('error', () => { + .on('error', () => { // do noting - }); + }); http.get({ agent: agentkeepalive, @@ -961,9 +961,9 @@ describe('test/agent.test.js', () => { }, () => { throw new Error('should not run this'); }) - .on('error', () => { - // do noting - }); + .on('error', () => { + // do noting + }); assert(Object.keys(agentkeepalive.sockets).length === 1); });