From 59d94abf21ce585494b9bdd36982f6a31bb7d502 Mon Sep 17 00:00:00 2001 From: Adrian Date: Mon, 23 Dec 2024 11:29:53 -0600 Subject: [PATCH] readme + coverable files with changes --- README.md | 3 ++- words/words.js | 6 +++++- words/words.test.js | 6 +++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d45b8f4..e43314e 100644 --- a/README.md +++ b/README.md @@ -3,4 +3,5 @@ 4 5 6 -7 \ No newline at end of file +7 +hello \ No newline at end of file diff --git a/words/words.js b/words/words.js index 708da6d..dbbd473 100644 --- a/words/words.js +++ b/words/words.js @@ -10,4 +10,8 @@ function hello(a) { return a === 5 ? "hello!" : "nope" } -module.exports = {returnPlus3, reverse}; \ No newline at end of file +function bye() { + return "bye" +} + +module.exports = {returnPlus3, reverse, bye}; \ No newline at end of file diff --git a/words/words.test.js b/words/words.test.js index 8ef1961..846b62a 100644 --- a/words/words.test.js +++ b/words/words.test.js @@ -1,4 +1,4 @@ -const {returnPlus3, reverse, hello} = require('./words'); +const {returnPlus3, reverse, hello, bye} = require('./words'); test("returns the given array reversed", function(){ expect(reverse([1, 2, 3])).toEqual([3, 2, 1]) @@ -7,3 +7,7 @@ test("returns the given array reversed", function(){ test("returns + 3 of whatever you give it", function(){ expect(returnPlus3(4)).toBe(7) }) + +test("return bye", function(){ + expect(bye()).toBe("bye") +})