import { divide } from "./index"; describe("Test divide", () => { it.each([ { foo: "", bar: "", expected: "" }, ])( "should $foo $bar", ({ foo, bar, expected }) => { // act // const result = function (foo, bar); const result = 0; // assert expect(result).toEqual(expected); console.log(`Test with foo = ${foo}, bar = ${bar}, expected = ${expected}, result = ${result}`); } ); /* * * If exception test * * */ it("should throw an exception when dividing by zero", () => { // arrange const foo = ""; const bar = ""; // act & assert ///TODO // expect(() => function (foo, bar).toThrow("E"); console.log(foo + bar); }); });