Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

test function that call a function javascrip

var chai = require('chai');
var expect = chai.expect;
var Foo = require('../lib/foo');

describe('Foo', function () {

  it('should set role to 'user' if role is not valid', function () {

    var foo = new Foo({role: 'invalid'});
    expect(foo.config.role).to.equal('user');

  });

};
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #test #function #call #function #javascrip
ADD COMMENT
Topic
Name
1+9 =