Note that there are some explanatory texts on larger screens.

plurals
  1. POObject #<Object> has no method 'type'
    primarykey
    data
    text
    <p>My test code is </p> <pre><code>var strategy = require('../lib'); var should = require("should"); describe('passport-twitter', function() { it('should export Strategy constructor directly from package', function() { console.log('strategy is',strategy); strategy.should.have.type('function'); }); it('should export Strategy constructor', function() { strategy.Strategy.should.have.type('function'); }); }); </code></pre> <p>and when i run this test.it is giving me error </p> <pre><code>1) passport-twitter should export Strategy constructor directly from package: TypeError: Object #&lt;Object&gt; has no method 'type' at Context.&lt;anonymous&gt; (/home/ritesh/projects/passport-topcoder/test/module.test.js:7:26) 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] (timers.js:330:15) 2) passport-twitter should export Strategy constructor: TypeError: Object #&lt;Object&gt; has no method 'type' at Context.&lt;anonymous&gt; (/home/ritesh/projects/passport-topcoder/test/module.test.js:11:35) 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] (timers.js:330:15) </code></pre> <p>but the type method is specified in documentation.how to get rid of this error.please help a bit.</p> <p>instead of this when i try to run </p> <p>aa</p> <pre><code>var strategy = require('..'); var should = require("should"); describe('passport-twitter', function() { it('should export', function() { console.log('strategy is',strategy); 'xxxx'.should.have.type('function'); }); }); </code></pre> <p>still i am getting the error </p> <pre><code> 1) passport-twitter should export: TypeError: Object #&lt;Object&gt; has no method 'type' at Context.&lt;anonymous&gt; (/home/ritesh/projects/passport-topcoder/test/module.test.js:7:23) 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] (timers.js:330:15) </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload