From 68000f47d01408cacb80441a1d9bf10ba423e54c Mon Sep 17 00:00:00 2001 From: Denis Bardadym Date: Fri, 10 Jan 2014 14:11:51 +0400 Subject: [PATCH] Deal with assert module more accurately --- lib/ext/assert.js | 2 +- lib/should.js | 3 +-- lib/util.js | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/ext/assert.js b/lib/ext/assert.js index b3bd8ee..91a3cc0 100644 --- a/lib/ext/assert.js +++ b/lib/ext/assert.js @@ -5,7 +5,7 @@ */ var util = require('../util') - , assert = util.assert + , assert = require('assert') , AssertionError = assert.AssertionError; module.exports = function(should) { diff --git a/lib/should.js b/lib/should.js index 408e4b9..3bbc0c5 100644 --- a/lib/should.js +++ b/lib/should.js @@ -6,8 +6,7 @@ var util = require('./util') - , assert = util.assert - , AssertionError = assert.AssertionError + , AssertionError = util.AssertionError , inspect = util.inspect; /** diff --git a/lib/util.js b/lib/util.js index 0aa49b6..9b8d7a3 100644 --- a/lib/util.js +++ b/lib/util.js @@ -106,7 +106,7 @@ exports.isError = isError; exports.inspect = require('util').inspect; -exports.assert = require('assert'); +exports.AssertionError = require('assert').AssertionError; var hasOwnProperty = Object.prototype.hasOwnProperty;