Skip to content
Snippets Groups Projects
Commit ce194ecc authored by Dimitrios Vergados's avatar Dimitrios Vergados
Browse files

Fix tests

parent 1695d885
Branches
No related tags found
No related merge requests found
Pipeline #3669 failed
...@@ -2,10 +2,10 @@ import min from "../solution_09.js"; ...@@ -2,10 +2,10 @@ import min from "../solution_09.js";
import assert from "assert"; import assert from "assert";
describe("\n\nSolution_09", () => { describe("\n\nSolution_09", () => {
it("should return 2 for [2,5]", () => { it("should return 2 for min(2,5)", () => {
assert.equal(min([2, 5]), 2); assert.equal(min(2, 5), 2);
}); });
it("should return 3 for [6,3]", () => { it("should return 3 for min(6,3)", () => {
assert.equal(min([6, 3]), 3); assert.equal(min(6, 3), 3);
}); });
}); });
...@@ -8,9 +8,10 @@ describe("\n\nSolution_11", () => { ...@@ -8,9 +8,10 @@ describe("\n\nSolution_11", () => {
[{ name: "Jane", surname: "Smith" }, "Jenny"], [{ name: "Jane", surname: "Smith" }, "Jenny"],
].map((n) => { ].map((n) => {
let surname = n[0].surname; let surname = n[0].surname;
console.log(`obj is ${n[0]}`);
setName(n[0], n[1]); setName(n[0], n[1]);
assert.equal(n[0].name, n[1]); assert.equal(n[0].name, n[1]);
assert.equal(surname, person.surname); assert.equal(surname, n[0].surname);
}); });
}); });
}); });
import isCorrectName from "../solution_12.js"; import removeName from "../solution_12.js";
import assert from "assert"; import assert from "assert";
describe("\n\nSolution_12", () => { describe("\n\nSolution_12", () => {
...@@ -9,7 +9,7 @@ describe("\n\nSolution_12", () => { ...@@ -9,7 +9,7 @@ describe("\n\nSolution_12", () => {
].map((person) => { ].map((person) => {
let surname = person.surname; let surname = person.surname;
removeName(person); removeName(person);
assert.equal(('name' in person), false); assert.equal("name" in person, false);
assert.equal(surname, person.surname); assert.equal(surname, person.surname);
}); });
}); });
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment