Skip to content

Commit

Permalink
Merge pull request #101 from joinpursuit/start-with-all-tests-red
Browse files Browse the repository at this point in the history
add check for empty method
  • Loading branch information
benstone1 authored Oct 26, 2020
2 parents d76be59 + 61e15fe commit 74b289f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions __tests__/loops.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -287,9 +287,10 @@ describe("containsWhileLoop", () => {
expect(funcString.includes("for")).toBe(false);
});

test("does not use built in includes method", () => {
test("is implemented and does not use built in includes method", () => {
const funcString = containsWhileLoop.toString();
expect(funcString.includes("includes")).toBe(false);
expect(funcString !== "function containsWhileLoop() {}").toBe(true)
});
});

Expand All @@ -309,9 +310,10 @@ describe("containsForLoop", () => {
expect(funcString.includes("for")).toBe(true);
});

test("does not use built in includes method", () => {
test("is implemented and does not use built in includes method", () => {
const funcString = containsForLoop.toString();
expect(funcString.includes("includes")).toBe(false);
expect(funcString !== "function containsForLoop() {}").toBe(true)
});
});

Expand Down

0 comments on commit 74b289f

Please sign in to comment.