Permalink
Browse files

remove assertions

  • Loading branch information...
dominictarr committed Mar 12, 2013
1 parent 8b2c25a commit 19bc21d8b9ecb60eba2cad82d48964b5c6772053
Showing with 6 additions and 5 deletions.
  1. +6 −5 index.js
View
@@ -1,4 +1,4 @@
-var a = require('assertions')
+var a = require('assert')
var macgyver = require('macgyver')
var Stream = require('stream')
@@ -13,9 +13,9 @@ function merge (to, from) {
module.exports = function (stream, opts) {
- a.isInstanceof(stream, Stream)
- a.property(stream,'pipe', a._isFunction())
- a.property(stream,'destroy', a._isFunction())
+ a.ok(stream instanceof Stream)
+ a.ok('function', typeof stream.pipe)
+ a.ok('function', typeof stream.destroy)
var mac = macgyver()
var opts = merge(('string' == typeof opts ? {name: opts} : opts) || {}, {name: 'stream'})
@@ -69,7 +69,8 @@ module.exports = function (stream, opts) {
}
function writableSpec (mac, stream, opts) {
- a.isFunction(stream.end, opts.name + '.end *must* be a function')
+
+ a.ok('function', typeof stream.destroy, opts.name + '.end *must* be a function')
a.equal(stream.writable, true, opts.name + '.writable *must* == true')
function e (n) { return opts.name + '.emit(\''+n+'\')' }
function n (n) { return opts.name + '.'+n+'()' }

0 comments on commit 19bc21d

Please sign in to comment.