Answer the question
In order to leave comments, you need to log in
How to test part of the code through Mocha.js?
I delve into js and testing, a question arose.
There is a script with different functions - script.js;
installed nodejs with chai.js and mocha.js;
var assert = require('assert');
describe('Cookies', function() {
describe('viewCookie()', function() {
it('should return undefined', function() {
assert.equal(undefined, viewCookie());
});
});
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question