test.js 354 B

123456789
  1. import toNumber from "./strnum.js";
  2. describe("Should convert all the valid numeric strings to number", () => {
  3. it("should return undefined, null, empty string, or non-numeric as it is", () => {
  4. // expect(toNumber("+ 90")).toEqual("+ 90");
  5. // expect(toNumber("- 90")).toEqual("- 90");
  6. expect(toNumber("-10E2")).toEqual(100);
  7. });
  8. });