You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 5, 2021. It is now read-only.
'use strict';varassert=require("chai");describe('Array',function(){describe('#indexOf()',function(){it('should return -1 when the value is not present',function(){assert.equal(-1,[1,2,3].indexOf(5));assert.equal(-1,[1,2,3].indexOf(0));})})});
...which is an example provided on the Chai website. I get the error
TypeError: Object #<Object> has no method 'equal'
Am I configuring things incorrectly?
The text was updated successfully, but these errors were encountered:
First you require "chai" then you set "assert" variable to be equal to chai.assert.
'use strict';varchai=require("chai");varassert=chai.assert;describe('Array',function(){describe('#indexOf()',function(){it('should return -1 when the value is not present',function(){assert.equal(-1,[1,2,3].indexOf(5));assert.equal(-1,[1,2,3].indexOf(0));})})});
I'm attempting to add tests to my Grunt plugin. I want to use Mocha and Chai.
I've added simple mocha and installed chai from npm. initConfig is
I have test.js with content as per
...which is an example provided on the Chai website. I get the error
TypeError: Object #<Object> has no method 'equal'
Am I configuring things incorrectly?
The text was updated successfully, but these errors were encountered: