import removeNonDigitCharacters from "./removeNonDigitCharacters"; describe("removeNonDigitCharacters", () => { it("should return only the numbers present in a string containing both numbers and letters", () => { const output = removeNonDigitCharacters("cyan9"); expect(output).toEqual("9"); }); it("should return only the numbers present in a string containing only numbers", () => { const output = removeNonDigitCharacters("9"); expect(output).toEqual("9"); }); it("should return an empty string when passed a string that contains no numbers", () => { const output = removeNonDigitCharacters("cyan"); expect(output).toEqual(""); }); });