Slide 4
Slide 4 text
Real Code! Wohoo….
• If you're all into Rspec, you’ll see Jasmine Framework very
similar.
describe('JavaScript addition operator', function () {
it('adds two numbers together', function () { expect(1 +
2).toEqual(3);
}); });
• “Describe” and “it” functions – Take two parameters a string
and a function.
• Inside “it” block – Write setup code you need for your test.
• Ready to write the actual test – Start with the “expect”
function.