2022-10-27 15:07:13 +00:00
|
|
|
import { isAnagram } from ".";
|
|
|
|
|
|
|
|
describe("isAnagram", () => {
|
|
|
|
it("Dever retornar true quando passamos as palavras \"roma\" e \"amor\"", () => {
|
|
|
|
expect(isAnagram("roma", "amor")).toBe(true);
|
|
|
|
});
|
|
|
|
|
2022-10-31 22:06:51 +00:00
|
|
|
it("Dever retornar true quando passamos as palavras \"Buckethead\" e \"DeathCubeK\"", () => {
|
2022-10-27 15:07:13 +00:00
|
|
|
expect(isAnagram("Buckethead", "DeathCubeK")).toBe(true);
|
|
|
|
});
|
|
|
|
|
2022-10-31 22:06:51 +00:00
|
|
|
it("Dever retornar true quando passamos as palavras \"Twoo\" e \"WooT\"", () => {
|
2022-10-27 15:07:13 +00:00
|
|
|
expect(isAnagram("Twoo", "WooT")).toBe(true);
|
|
|
|
});
|
|
|
|
|
2022-10-31 22:06:51 +00:00
|
|
|
it("Dever retornar false quando passamos as palavras \"dumble\" e \"bumble\"", () => {
|
2022-10-27 15:07:13 +00:00
|
|
|
expect(isAnagram("dumble", "bumble")).toBe(false);
|
|
|
|
});
|
|
|
|
|
2022-10-31 22:06:51 +00:00
|
|
|
it("Dever retornar false quando passamos as palavras \"ound\" e \"round\"", () => {
|
2022-10-27 15:07:13 +00:00
|
|
|
expect(isAnagram("ound", "round")).toBe(false);
|
|
|
|
});
|
|
|
|
|
2022-10-31 22:06:51 +00:00
|
|
|
it("Dever retornar false quando passamos as palavras \"apple\" e \"pale\"", () => {
|
2022-10-27 15:07:13 +00:00
|
|
|
expect(isAnagram("apple", "pale")).toBe(false);
|
|
|
|
});
|
|
|
|
});
|