I am using Jest to test for a function, which generate a english word.
I tried below but not working. Just want to check if the word is combined by english characters
it("generate a english word", () => {
const word = "APPLE";
expect(word).toMatch('/^[A-Za-z]*$/');
});
What’s wrong with it?