fix(isAnagrama and sum): ajuste erro no ultimo teste

This commit is contained in:
Caroline Moran 2022-10-27 15:32:41 -04:00
parent 8380b20c4a
commit b78dc99fb3
2 changed files with 21 additions and 21 deletions

View File

@ -39,7 +39,7 @@ describe("sum", () => {
// Criar um teste para numeros negativos // Criar um teste para numeros negativos
it("Dever retornar -51 quando passamos o array [-1, -5, -10, -45]", () => { it("Dever retornar -51 quando passamos o array [-1, 5, -10, -45]", () => {
expect(sum([-1, 5, -10, -45])).toBe(-51); expect(sum([-1, 5, -10, -45])).toBe(-51);
}); });

View File

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