challenge-algorithms-v2.0-s.../08-isAnagram/index.test.js
2022-10-27 15:32:41 -04:00

28 lines
929 B
JavaScript

import { isAnagram } from ".";
describe("isAnagram", () => {
it('Dever retornar true quando passamos as palavras "roma" e "amor"', () => {
expect(isAnagram("roma", "amor")).toBe(true);
});
it('Dever retornar true quando passamos as palavras "Buckethead" e "DeathCubeK"', () => {
expect(isAnagram("Buckethead", "DeathCubeK")).toBe(true);
});
it('Dever retornar true quando passamos as palavras "Twoo" e "WooT"', () => {
expect(isAnagram("Twoo", "WooT")).toBe(true);
});
it('Dever retornar false quando passamos as palavras "dumble" e "bumble"', () => {
expect(isAnagram("dumble", "bumble")).toBe(false);
});
it('Dever retornar false quando passamos as palavras "ound" e "round"', () => {
expect(isAnagram("ound", "round")).toBe(false);
});
it('Dever retornar false quando passamos as palavras "apple" e "pale"', () => {
expect(isAnagram("apple", "pale")).toBe(false);
});
});