Jasmine

Framework Javascript de test BDD.

Exemples

Code

describe("A suite is just a function", function() {<br>
  var a;

  it("and so is a spec", function() {
    a = true;

    expect(a).toBe(true);
  });
});

describe("The 'toBe' matcher compares with ===", function() {

  it("and has a positive case", function() {
    expect(true).toBe(true);
  });

  it("and can have a negative case", function() {
    expect(false).not.toBe(true);
  });
});

Bibliothèques

  • node-jasmine
  • grunt-jasmine pour exécuter Jasmine via Grunt
  • gulp-jasmine

Notes