I am trying to get my hands dirty with Mocha and here is the example I saw from documentation:
var assert = require("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));
})
})
})
Most of the examples show the second describe statement
describe('#indexOf()', function(){
starting with #
in #indexOf()
. What is the significance of this #
? Why can this not be written simply as indexOf
? Where can I get a fundamental understanding of how the describe works?
PS: I looked at the documentation at http://visionmedia.github.io/mocha/#interfaces but can't figure out how these came into picture and how are these interfaces processed.
Thx