Skip to content

Commit c10d69e

Browse files
authored
fix: remove promise support check from tests (#141)
Promises are supported in all supported Node.js version so the check is unnecessary
1 parent 337c45b commit c10d69e

File tree

3 files changed

+3
-9
lines changed

3 files changed

+3
-9
lines changed

test/param.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ const shouldNotHitHandle = utils.shouldNotHitHandle
1010
const createServer = utils.createServer
1111
const request = utils.request
1212

13-
const describePromises = global.Promise ? describe : describe.skip
14-
1513
describe('Router', function () {
1614
describe('.param(name, fn)', function () {
1715
it('should reject missing name', function () {
@@ -264,7 +262,7 @@ describe('Router', function () {
264262
.expect(500, /Error: boom/, done)
265263
})
266264

267-
describePromises('promise support', function () {
265+
describe('promise support', function () {
268266
it('should pass rejected promise value', function (done) {
269267
const router = new Router()
270268
const server = createServer(router)

test/route.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ const shouldNotHaveBody = utils.shouldNotHaveBody
1414
const shouldNotHitHandle = utils.shouldNotHitHandle
1515
const methods = utils.methods
1616

17-
const describePromises = global.Promise ? describe : describe.skip
18-
1917
describe('Router', function () {
2018
describe('.route(path)', function () {
2119
it('should return a new route', function () {
@@ -542,7 +540,7 @@ describe('Router', function () {
542540
})
543541
})
544542

545-
describePromises('promise support', function () {
543+
describe('promise support', function () {
546544
it('should pass rejected promise value', function (done) {
547545
const router = new Router()
548546
const route = router.route('/foo')

test/router.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ const shouldNotHaveBody = utils.shouldNotHaveBody
1515
const shouldNotHitHandle = utils.shouldNotHitHandle
1616
const methods = utils.methods
1717

18-
const describePromises = global.Promise ? describe : describe.skip
19-
2018
describe('Router', function () {
2119
it('should return a function', function () {
2220
assert.equal(typeof Router(), 'function')
@@ -770,7 +768,7 @@ describe('Router', function () {
770768
})
771769
})
772770

773-
describePromises('promise support', function () {
771+
describe('promise support', function () {
774772
it('should pass rejected promise value', function (done) {
775773
const router = new Router()
776774
const server = createServer(router)

0 commit comments

Comments
 (0)