Closed rm-rf-etc closed 11 years ago
The following fails for me, using mocha.
var should = require('should')
describe('using type', function(){ it('should work', function(){ 'my string'.should.have.type('string') }) })
0 passing (4ms) 1 failing
1) using type should work: TypeError: Object # has no method 'typeof' at Context. (/Users/MyName/www/rapid/vessel/test/test2.js:6:33) at Test.Runnable.run (/usr/local/lib/node_modules/mocha/lib/runnable.js:211:32) at Runner.runTest (/usr/local/lib/node_modules/mocha/lib/runner.js:358:10) at /usr/local/lib/node_modules/mocha/lib/runner.js:404:12 at next (/usr/local/lib/node_modules/mocha/lib/runner.js:284:14) at /usr/local/lib/node_modules/mocha/lib/runner.js:293:7 at next (/usr/local/lib/node_modules/mocha/lib/runner.js:237:23) at Object._onImmediate (/usr/local/lib/node_modules/mocha/lib/runner.js:261:5) at processImmediate as _immediateCallback
while this works fine:
describe('using type', function(){ it('should work', function(){ (typeof 'my string' === 'string').should.have.true }) })
․
1 passing (3ms)
Current docs for version 2.0.0 which is not published now to npmjs. It will be published i hope at this week. For version 1.x.x use this readme.
The following fails for me, using mocha.
var should = require('should')
describe('using type', function(){ it('should work', function(){ 'my string'.should.have.type('string') }) })
0 passing (4ms) 1 failing
1) using type should work: TypeError: Object #