UNPKG

jest-spiratest

Version:

This reporter will integrate JestJS with Inflectra's ALM suite. It will create a test run in Spira for each test executed in Jest. ### Don't have Spira? If you haven't tried out one of our products, you can get a 30 day free trial for our flagship ALM pro

26 lines (20 loc) 479 B
const Calculator = require('./Calculator'); var calc; beforeEach(() => { calc = new Calculator(); }); test("Stores correctly", () => { calc.storeValue(3); expect(calc.storedValue).toBe(3); }) test("Adds correctly", () => { expect(calc.add(1, 4)).toBe(5); }); test("Multiplies correctly", () => { //Should fail expect(calc.multiply(2, 6)).toBe(11); }); test("Exponents work correctly", () => { //Should fail expect(calc.exp(2, 4)).toBe(9); })