|
1 | 1 |
|
| 2 | +var assert = require('assert') |
2 | 3 | var http = require('http')
|
3 | 4 | var request = require('supertest')
|
4 |
| -var should = require('should') |
5 | 5 | var vhost = require('..')
|
6 | 6 |
|
7 | 7 | describe('vhost(hostname, server)', function(){
|
@@ -81,29 +81,29 @@ describe('vhost(hostname, server)', function(){
|
81 | 81 | describe('arguments', function(){
|
82 | 82 | describe('hostname', function(){
|
83 | 83 | it('should be required', function(){
|
84 |
| - vhost.bind().should.throw(/hostname.*required/) |
| 84 | + assert.throws(vhost.bind(), /hostname.*required/) |
85 | 85 | })
|
86 | 86 |
|
87 | 87 | it('should accept string', function(){
|
88 |
| - vhost.bind(null, 'loki.com', function(){}).should.not.throw() |
| 88 | + assert.doesNotThrow(vhost.bind(null, 'loki.com', function(){})) |
89 | 89 | })
|
90 | 90 |
|
91 | 91 | it('should accept RegExp', function(){
|
92 |
| - vhost.bind(null, /loki\.com/, function(){}).should.not.throw() |
| 92 | + assert.doesNotThrow(vhost.bind(null, /loki\.com/, function(){})) |
93 | 93 | })
|
94 | 94 | })
|
95 | 95 |
|
96 | 96 | describe('handle', function(){
|
97 | 97 | 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/) |
99 | 99 | })
|
100 | 100 |
|
101 | 101 | it('should accept function', function(){
|
102 |
| - vhost.bind(null, 'loki.com', function(){}).should.not.throw() |
| 102 | + assert.doesNotThrow(vhost.bind(null, 'loki.com', function(){})) |
103 | 103 | })
|
104 | 104 |
|
105 | 105 | 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/) |
107 | 107 | })
|
108 | 108 | })
|
109 | 109 | })
|
|
0 commit comments