Skip to content

Commit cace5eb

Browse files
committed
tests: use assert instead of should
1 parent fb8874a commit cace5eb

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

package.json

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
"devDependencies": {
1212
"istanbul": "0.3.17",
1313
"mocha": "2.2.5",
14-
"should": "~4.0.1",
1514
"supertest": "1.0.1"
1615
},
1716
"files": [

test/test.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

2+
var assert = require('assert')
23
var http = require('http')
34
var request = require('supertest')
4-
var should = require('should')
55
var vhost = require('..')
66

77
describe('vhost(hostname, server)', function(){
@@ -81,29 +81,29 @@ describe('vhost(hostname, server)', function(){
8181
describe('arguments', function(){
8282
describe('hostname', function(){
8383
it('should be required', function(){
84-
vhost.bind().should.throw(/hostname.*required/)
84+
assert.throws(vhost.bind(), /hostname.*required/)
8585
})
8686

8787
it('should accept string', function(){
88-
vhost.bind(null, 'loki.com', function(){}).should.not.throw()
88+
assert.doesNotThrow(vhost.bind(null, 'loki.com', function(){}))
8989
})
9090

9191
it('should accept RegExp', function(){
92-
vhost.bind(null, /loki\.com/, function(){}).should.not.throw()
92+
assert.doesNotThrow(vhost.bind(null, /loki\.com/, function(){}))
9393
})
9494
})
9595

9696
describe('handle', function(){
9797
it('should be required', function(){
98-
vhost.bind(null, 'loki.com').should.throw(/handle.*required/)
98+
assert.throws(vhost.bind(null, 'loki.com'), /handle.*required/)
9999
})
100100

101101
it('should accept function', function(){
102-
vhost.bind(null, 'loki.com', function(){}).should.not.throw()
102+
assert.doesNotThrow(vhost.bind(null, 'loki.com', function(){}))
103103
})
104104

105105
it('should reject plain object', function(){
106-
vhost.bind(null, 'loki.com', {}).should.throw(/handle.*function/)
106+
assert.throws(vhost.bind(null, 'loki.com', {}), /handle.*function/)
107107
})
108108
})
109109
})

0 commit comments

Comments
 (0)