Accueil / javascript / 1-js / 03-code-quality / 05-testing-mocha / pow-2.view / test.js

test.js

describe("pow", function() {

  it("2 raised to power 3 is 8", function() {
    assert.equal(pow(2, 3), 8);
  });

  it("3 raised to power 4 is 81", function() {
    assert.equal(pow(3, 4), 81);
  });

});

Exemple