From e691edc97c3b5ca6b971090cbf3ab46de468ccfc Mon Sep 17 00:00:00 2001 From: Tatiana Date: Sat, 8 May 2021 11:28:50 -0700 Subject: [PATCH] Revert "Merge pull request #1 from xandora/jester-tester" This reverts commit e9010908960afcae3a9433a16c71ae367ac99465, reversing changes made to 42076e7424f8b37ecbecf830fedb6748d49b72ea. --- .gitignore | 1 - fibonacci/fibonacci.js | 2 +- findTheOldest/findTheOldest.js | 1 + findTheOldest/findTheOldest.spec.js | 22 +++++++++---------- getTheTitles/getTheTitles.spec.js | 28 ++++++++++++------------- leapYears/leapYears.spec.js | 14 ++++++------- palindromes/palindromes.js | 1 + palindromes/palindromes.spec.js | 28 ++++++++++++------------- pig_latin/pigLatin.js | 8 ++++--- removeFromArray/removeFromArray.spec.js | 16 +++++++------- snakeCase/snakeCase.spec.js | 2 +- sumAll/sumAll.spec.js | 2 +- 12 files changed, 63 insertions(+), 62 deletions(-) diff --git a/.gitignore b/.gitignore index 7c78742..722d5e7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ .vscode -node_modules diff --git a/fibonacci/fibonacci.js b/fibonacci/fibonacci.js index 547dcb1..1c4b559 100644 --- a/fibonacci/fibonacci.js +++ b/fibonacci/fibonacci.js @@ -1,3 +1,3 @@ const fibonacci = function () {}; -module.exports = fibonacci +module.exports = fibonacci; diff --git a/findTheOldest/findTheOldest.js b/findTheOldest/findTheOldest.js index 642e783..6a6b1a9 100644 --- a/findTheOldest/findTheOldest.js +++ b/findTheOldest/findTheOldest.js @@ -1,2 +1,3 @@ let findTheOldest = function () {}; + module.exports = findTheOldest; diff --git a/findTheOldest/findTheOldest.spec.js b/findTheOldest/findTheOldest.spec.js index 854e778..670a211 100644 --- a/findTheOldest/findTheOldest.spec.js +++ b/findTheOldest/findTheOldest.spec.js @@ -1,7 +1,7 @@ -let findTheOldest = require("./findTheOldest"); +let findTheOldest = require('./findTheOldest') -describe("findTheOldest", function () { - it("finds the oldest person!", function () { +describe('findTheOldest', function() { + it('finds the oldest person!', function() { const people = [ { name: "Carly", @@ -18,10 +18,10 @@ describe("findTheOldest", function () { yearOfBirth: 1912, yearOfDeath: 1941, }, - ]; - expect(findTheOldest(people).name).toEqual("Ray"); + ] + expect(findTheOldest(people).name).toEqual('Ray'); }); - xit("finds the oldest person if someone is still living", function () { + xit('finds the oldest person if someone is still living', function() { const people = [ { name: "Carly", @@ -37,10 +37,10 @@ describe("findTheOldest", function () { yearOfBirth: 1912, yearOfDeath: 1941, }, - ]; - expect(findTheOldest(people).name).toEqual("Ray"); + ] + expect(findTheOldest(people).name).toEqual('Ray'); }); - xit("finds the oldest person if the OLDEST is still living", function () { + xit('finds the oldest person if the OLDEST is still living', function() { const people = [ { name: "Carly", @@ -56,7 +56,7 @@ describe("findTheOldest", function () { yearOfBirth: 1912, yearOfDeath: 1941, }, - ]; - expect(findTheOldest(people).name).toEqual("Carly"); + ] + expect(findTheOldest(people).name).toEqual('Carly'); }); }); diff --git a/getTheTitles/getTheTitles.spec.js b/getTheTitles/getTheTitles.spec.js index 392cf04..aafc5c6 100644 --- a/getTheTitles/getTheTitles.spec.js +++ b/getTheTitles/getTheTitles.spec.js @@ -1,18 +1,18 @@ -let getTheTitles = require("./getTheTitles"); +let getTheTitles = require('./getTheTitles') -describe("getTheTitles", function () { - const books = [ - { - title: "Book", - author: "Name", - }, - { - title: "Book2", - author: "Name2", - }, - ]; +describe('getTheTitles', function() { + const books = [ + { + title: 'Book', + author: 'Name' + }, + { + title: 'Book2', + author: 'Name2' + } + ] - it("gets titles", function () { - expect(getTheTitles(books)).toEqual(["Book", "Book2"]); + it('gets titles', function() { + expect(getTheTitles(books)).toEqual(['Book','Book2']); }); }); diff --git a/leapYears/leapYears.spec.js b/leapYears/leapYears.spec.js index e4e4a9b..2887fe5 100644 --- a/leapYears/leapYears.spec.js +++ b/leapYears/leapYears.spec.js @@ -1,22 +1,22 @@ const leapYears = require("./leapYears"); -describe("leapYears", function () { - it("works with non century years", function () { +describe('leapYears', function() { + it('works with non century years', function() { expect(leapYears(1996)).toEqual(true); }); - xit("works with non century years", function () { + xit('works with non century years', function() { expect(leapYears(1997)).toEqual(false); }); - xit("works with ridiculously futuristic non century years", function () { + xit('works with ridiculously futuristic non century years', function() { expect(leapYears(34992)).toEqual(true); }); - xit("works with century years", function () { + xit('works with century years', function() { expect(leapYears(1900)).toEqual(false); }); - xit("works with century years", function () { + xit('works with century years', function() { expect(leapYears(1600)).toEqual(true); }); - xit("works with century years", function () { + xit('works with century years', function() { expect(leapYears(700)).toEqual(false); }); }); diff --git a/palindromes/palindromes.js b/palindromes/palindromes.js index 460f0f3..d8e8402 100644 --- a/palindromes/palindromes.js +++ b/palindromes/palindromes.js @@ -1,3 +1,4 @@ const palindromes = function () {}; + module.exports = palindromes diff --git a/palindromes/palindromes.spec.js b/palindromes/palindromes.spec.js index b40ad28..fcd4b6f 100644 --- a/palindromes/palindromes.spec.js +++ b/palindromes/palindromes.spec.js @@ -1,24 +1,22 @@ const palindromes = require("./palindromes"); -describe("palindromes", function () { - it("works with single words", function () { - expect(palindromes("racecar")).toEqual(true); +describe('palindromes', function() { + it('works with single words', function() { + expect(palindromes('racecar')).toEqual(true); }); - xit("works with punctuation ", function () { - expect(palindromes("racecar!")).toEqual(true); + xit('works with punctuation ', function() { + expect(palindromes('racecar!')).toEqual(true); }); - xit("works with upper-case letters ", function () { - expect(palindromes("Racecar!")).toEqual(true); + xit('works with upper-case letters ', function() { + expect(palindromes('Racecar!')).toEqual(true); }); - xit("works with multiple words", function () { - expect(palindromes("A car, a man, a maraca.")).toEqual(true); + xit('works with multiple words', function() { + expect(palindromes('A car, a man, a maraca.')).toEqual(true); }); - xit("works with multiple words", function () { - expect( - palindromes("Animal loots foliated detail of stool lamina.") - ).toEqual(true); + xit('works with multiple words', function() { + expect(palindromes('Animal loots foliated detail of stool lamina.')).toEqual(true); }); - xit("doesn't just always return true", function () { - expect(palindromes("ZZZZ car, a man, a maraca.")).toEqual(false); + xit('doesn\'t just always return true', function() { + expect(palindromes('ZZZZ car, a man, a maraca.')).toEqual(false); }); }); diff --git a/pig_latin/pigLatin.js b/pig_latin/pigLatin.js index 2b3c2a6..c9784c3 100644 --- a/pig_latin/pigLatin.js +++ b/pig_latin/pigLatin.js @@ -1,7 +1,9 @@ function translate() { - // body... + // body... } + module.exports = { - translate, -}; + translate +} + diff --git a/removeFromArray/removeFromArray.spec.js b/removeFromArray/removeFromArray.spec.js index 76dcdc4..879d8b6 100644 --- a/removeFromArray/removeFromArray.spec.js +++ b/removeFromArray/removeFromArray.spec.js @@ -1,25 +1,25 @@ const removeFromArray = require("./removeFromArray"); -describe("removeFromArray", function () { - it("removes a single value", function () { +describe('removeFromArray', function() { + it('removes a single value', function() { expect(removeFromArray([1, 2, 3, 4], 3)).toEqual([1, 2, 4]); }); - xit("removes multiple values", function () { + xit('removes multiple values', function() { expect(removeFromArray([1, 2, 3, 4], 3, 2)).toEqual([1, 4]); }); - xit("ignores non present values", function () { + xit('ignores non present values', function() { expect(removeFromArray([1, 2, 3, 4], 7, "tacos")).toEqual([1, 2, 3, 4]); }); - xit("ignores non present values, but still works", function () { + xit('ignores non present values, but still works', function() { expect(removeFromArray([1, 2, 3, 4], 7, 2)).toEqual([1, 3, 4]); }); - xit("can remove all values", function () { + xit('can remove all values', function() { expect(removeFromArray([1, 2, 3, 4], 1, 2, 3, 4)).toEqual([]); }); - xit("works with strings", function () { + xit('works with strings', function() { expect(removeFromArray(["hey", 2, 3, "ho"], "hey", 3)).toEqual([2, "ho"]); }); - xit("only removes same type", function () { + xit('only removes same type', function() { expect(removeFromArray([1, 2, 3], "1", 3)).toEqual([1, 2]); }); }); diff --git a/snakeCase/snakeCase.spec.js b/snakeCase/snakeCase.spec.js index 6a33bda..1a982d4 100644 --- a/snakeCase/snakeCase.spec.js +++ b/snakeCase/snakeCase.spec.js @@ -1,4 +1,4 @@ -const snakeCase = require("./snakeCase"); +const snakeCase = require('./snakeCase') describe("snakeCase", function () { it("works with simple lowercased phrases", function () { diff --git a/sumAll/sumAll.spec.js b/sumAll/sumAll.spec.js index 0ea1a70..cd06a11 100644 --- a/sumAll/sumAll.spec.js +++ b/sumAll/sumAll.spec.js @@ -1,4 +1,4 @@ -const sumAll = require("./sumAll"); +const sumAll = require('./sumAll') describe("sumAll", function () { it("sums numbers within the range", function () {