Skip to main content

Posts

Showing posts with the label Angular Testing

What is the Jasmine test framework? Why Jasmine?

What is the Jasmine test framework? Why Jasmine? Jasmine is a JavaScript testing framework that supports a software development practice called Behaviour Driven Development that plays very well with Karma. It’s a specific flavor of Test Driven Development (TDD) . Jasmine is also dependency-free and doesn’t require a DOM. Jasmine provides a rich set of pre-defined matchers - default set of matchers 1.        expect(number).toBeGreaterThan(number); 2.        expect(number).toBeLessThan(number); 3.        expect(array).toContain(member); 4.        expect(array).toBeArray(); 5.        expect(fn).toThrow(string); 6.        expect(fn).toThrowError(string); 7.        expect(instance).toBe(instance); represents the exact equality (===) operator. 8.  ...