Testing / Jasmine Interview Questions
What is Jasmine?
Jasmine is a behavior-driven development framework for testing JavaScript code. It does not depend on any other JavaScript frameworks. It does not require a DOM. And it has a clean, obvious syntax so that you can easily write tests.
Karma is a tool of running tests on browsers it lets us spawn browsers and run jasmine tests inside of them.
function message() { return 'Hello world!'; }
We would write a jasmine test spec like so:
describe('Hello world', () => { it('says hello', () => { expect(message()) .toEqual('Hello world!'); }); });
More Related questions...