From cace5eb6dc935193497faa1ffcb3cc976e20c2ab Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Sun, 19 Jul 2015 22:02:37 -0400 Subject: [PATCH] tests: use assert instead of should --- package.json | 1 - test/test.js | 14 +++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index b4c80cd..725fd32 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,6 @@ "devDependencies": { "istanbul": "0.3.17", "mocha": "2.2.5", - "should": "~4.0.1", "supertest": "1.0.1" }, "files": [ diff --git a/test/test.js b/test/test.js index d1b442c..7f77e50 100644 --- a/test/test.js +++ b/test/test.js @@ -1,7 +1,7 @@ +var assert = require('assert') var http = require('http') var request = require('supertest') -var should = require('should') var vhost = require('..') describe('vhost(hostname, server)', function(){ @@ -81,29 +81,29 @@ describe('vhost(hostname, server)', function(){ describe('arguments', function(){ describe('hostname', function(){ it('should be required', function(){ - vhost.bind().should.throw(/hostname.*required/) + assert.throws(vhost.bind(), /hostname.*required/) }) it('should accept string', function(){ - vhost.bind(null, 'loki.com', function(){}).should.not.throw() + assert.doesNotThrow(vhost.bind(null, 'loki.com', function(){})) }) it('should accept RegExp', function(){ - vhost.bind(null, /loki\.com/, function(){}).should.not.throw() + assert.doesNotThrow(vhost.bind(null, /loki\.com/, function(){})) }) }) describe('handle', function(){ it('should be required', function(){ - vhost.bind(null, 'loki.com').should.throw(/handle.*required/) + assert.throws(vhost.bind(null, 'loki.com'), /handle.*required/) }) it('should accept function', function(){ - vhost.bind(null, 'loki.com', function(){}).should.not.throw() + assert.doesNotThrow(vhost.bind(null, 'loki.com', function(){})) }) it('should reject plain object', function(){ - vhost.bind(null, 'loki.com', {}).should.throw(/handle.*function/) + assert.throws(vhost.bind(null, 'loki.com', {}), /handle.*function/) }) }) })