From 2ec0f4344d94b047aaeb80037136d33f39515426 Mon Sep 17 00:00:00 2001 From: thatblindgeye Date: Wed, 1 Feb 2023 18:53:54 -0500 Subject: [PATCH] Updated file paths --- .../solution/helloWorld-solution.spec.js | 6 +-- .../solution/repeatString-solution.spec.js | 32 ++++++------- .../solution/reverseString-solution.spec.js | 20 ++++---- .../solution/removeFromArray-solution.spec.js | 24 +++++----- 05_sumAll/solution/sumAll-solution.spec.js | 26 +++++------ .../solution/leapYears-solution.spec.js | 16 +++---- .../solution/tempConversion-solution.spec.js | 21 +++++---- .../solution/calculator-solution.spec.js | 46 +++++++++---------- .../solution/palindromes-solution.spec.js | 26 +++++------ .../solution/fibonacci-solution.spec.js | 28 +++++------ .../solution/getTheTitles-solution.spec.js | 16 +++---- .../solution/findTheOldest-solution.spec.js | 34 +++++++------- 13_caesar/solution/caesar-solution.spec.js | 30 ++++++------ {pigLatin => archived_pigLatin}/README.md | 0 {pigLatin => archived_pigLatin}/pigLatin.js | 0 .../pigLatin.spec.js | 0 .../solution/pigLatin-solution.js | 0 .../solution/pigLatin-solution.spec.js | 34 +++++++------- {snakeCase => archived_snakeCase}/README.md | 0 .../snakeCase.js | 0 .../snakeCase.spec.js | 0 .../solution/snakeCase-solution.js | 0 .../solution/snakeCase-solution.spec.js | 26 +++++++++++ snakeCase/solution/snakeCase-solution.spec.js | 26 ----------- 24 files changed, 207 insertions(+), 204 deletions(-) rename {pigLatin => archived_pigLatin}/README.md (100%) rename {pigLatin => archived_pigLatin}/pigLatin.js (100%) rename {pigLatin => archived_pigLatin}/pigLatin.spec.js (100%) rename {pigLatin => archived_pigLatin}/solution/pigLatin-solution.js (100%) rename {pigLatin => archived_pigLatin}/solution/pigLatin-solution.spec.js (53%) rename {snakeCase => archived_snakeCase}/README.md (100%) rename {snakeCase => archived_snakeCase}/snakeCase.js (100%) rename {snakeCase => archived_snakeCase}/snakeCase.spec.js (100%) rename {snakeCase => archived_snakeCase}/solution/snakeCase-solution.js (100%) create mode 100644 archived_snakeCase/solution/snakeCase-solution.spec.js delete mode 100644 snakeCase/solution/snakeCase-solution.spec.js diff --git a/01_helloWorld/solution/helloWorld-solution.spec.js b/01_helloWorld/solution/helloWorld-solution.spec.js index 5070e7f..210a7f8 100644 --- a/01_helloWorld/solution/helloWorld-solution.spec.js +++ b/01_helloWorld/solution/helloWorld-solution.spec.js @@ -1,7 +1,7 @@ -const helloWorld = require("./helloWorld"); +const helloWorld = require('./helloWorld-solution'); -describe("Hello World", function () { +describe('Hello World', function () { test('says "Hello, World!"', function () { - expect(helloWorld()).toEqual("Hello, World!"); + expect(helloWorld()).toEqual('Hello, World!'); }); }); diff --git a/02_repeatString/solution/repeatString-solution.spec.js b/02_repeatString/solution/repeatString-solution.spec.js index a4e2b0c..417e14f 100644 --- a/02_repeatString/solution/repeatString-solution.spec.js +++ b/02_repeatString/solution/repeatString-solution.spec.js @@ -1,22 +1,22 @@ -const repeatString = require("./repeatString"); +const repeatString = require('./repeatString-solution'); -describe("repeatString", () => { - test("repeats the string", () => { - expect(repeatString("hey", 3)).toEqual("heyheyhey"); +describe('repeatString', () => { + test('repeats the string', () => { + expect(repeatString('hey', 3)).toEqual('heyheyhey'); }); - test.skip("repeats the string many times", () => { - expect(repeatString("hey", 10)).toEqual("heyheyheyheyheyheyheyheyheyhey"); + test.skip('repeats the string many times', () => { + expect(repeatString('hey', 10)).toEqual('heyheyheyheyheyheyheyheyheyhey'); }); - test.skip("repeats the string 1 times", () => { - expect(repeatString("hey", 1)).toEqual("hey"); + test.skip('repeats the string 1 times', () => { + expect(repeatString('hey', 1)).toEqual('hey'); }); - test.skip("repeats the string 0 times", () => { - expect(repeatString("hey", 0)).toEqual(""); + test.skip('repeats the string 0 times', () => { + expect(repeatString('hey', 0)).toEqual(''); }); - test.skip("returns ERROR with negative numbers", () => { - expect(repeatString("hey", -1)).toEqual("ERROR"); + test.skip('returns ERROR with negative numbers', () => { + expect(repeatString('hey', -1)).toEqual('ERROR'); }); - test.skip("repeats the string a random amount of times", function () { + test.skip('repeats the string a random amount of times', function () { /*The number is generated by using Math.random to get a value from between 0 to 1, when this is multiplied by 1000 and rounded down with Math.floor it equals a number between 0 to 999 (this number will change everytime you run @@ -29,11 +29,11 @@ describe("repeatString", () => { /*The .match(/((hey))/g).length is a regex that will count the number of heys in the result, which if your function works correctly will equal the number that was randomaly generated. */ - expect(repeatString("hey", number).match(/((hey))/g).length).toEqual( + expect(repeatString('hey', number).match(/((hey))/g).length).toEqual( number ); }); - test.skip("works with blank strings", () => { - expect(repeatString("", 10)).toEqual(""); + test.skip('works with blank strings', () => { + expect(repeatString('', 10)).toEqual(''); }); }); diff --git a/03_reverseString/solution/reverseString-solution.spec.js b/03_reverseString/solution/reverseString-solution.spec.js index ab0b079..5ed33a1 100644 --- a/03_reverseString/solution/reverseString-solution.spec.js +++ b/03_reverseString/solution/reverseString-solution.spec.js @@ -1,18 +1,18 @@ -const reverseString = require("./reverseString"); +const reverseString = require('./reverseString-solution'); -describe("reverseString", () => { - test("reverses single word", () => { - expect(reverseString("hello")).toEqual("olleh"); +describe('reverseString', () => { + test('reverses single word', () => { + expect(reverseString('hello')).toEqual('olleh'); }); - test.skip("reverses multiple words", () => { - expect(reverseString("hello there")).toEqual("ereht olleh"); + test.skip('reverses multiple words', () => { + expect(reverseString('hello there')).toEqual('ereht olleh'); }); - test.skip("works with numbers and punctuation", () => { - expect(reverseString("123! abc!")).toEqual("!cba !321"); + test.skip('works with numbers and punctuation', () => { + expect(reverseString('123! abc!')).toEqual('!cba !321'); }); - test.skip("works with blank strings", () => { - expect(reverseString("")).toEqual(""); + test.skip('works with blank strings', () => { + expect(reverseString('')).toEqual(''); }); }); diff --git a/04_removeFromArray/solution/removeFromArray-solution.spec.js b/04_removeFromArray/solution/removeFromArray-solution.spec.js index 8c8a038..1916d98 100644 --- a/04_removeFromArray/solution/removeFromArray-solution.spec.js +++ b/04_removeFromArray/solution/removeFromArray-solution.spec.js @@ -1,25 +1,25 @@ -const removeFromArray = require("./removeFromArray"); +const removeFromArray = require('./removeFromArray-solution'); -describe("removeFromArray", () => { - test("removes a single value", () => { +describe('removeFromArray', () => { + test('removes a single value', () => { expect(removeFromArray([1, 2, 3, 4], 3)).toEqual([1, 2, 4]); }); - test.skip("removes multiple values", () => { + test.skip('removes multiple values', () => { expect(removeFromArray([1, 2, 3, 4], 3, 2)).toEqual([1, 4]); }); - test.skip("ignores non present values", () => { - expect(removeFromArray([1, 2, 3, 4], 7, "tacos")).toEqual([1, 2, 3, 4]); + test.skip('ignores non present values', () => { + expect(removeFromArray([1, 2, 3, 4], 7, 'tacos')).toEqual([1, 2, 3, 4]); }); - test.skip("ignores non present values, but still works", () => { + test.skip('ignores non present values, but still works', () => { expect(removeFromArray([1, 2, 3, 4], 7, 2)).toEqual([1, 3, 4]); }); - test.skip("can remove all values", () => { + test.skip('can remove all values', () => { expect(removeFromArray([1, 2, 3, 4], 1, 2, 3, 4)).toEqual([]); }); - test.skip("works with strings", () => { - expect(removeFromArray(["hey", 2, 3, "ho"], "hey", 3)).toEqual([2, "ho"]); + test.skip('works with strings', () => { + expect(removeFromArray(['hey', 2, 3, 'ho'], 'hey', 3)).toEqual([2, 'ho']); }); - test.skip("only removes same type", () => { - expect(removeFromArray([1, 2, 3], "1", 3)).toEqual([1, 2]); + test.skip('only removes same type', () => { + expect(removeFromArray([1, 2, 3], '1', 3)).toEqual([1, 2]); }); }); diff --git a/05_sumAll/solution/sumAll-solution.spec.js b/05_sumAll/solution/sumAll-solution.spec.js index bd4225f..8cd9826 100644 --- a/05_sumAll/solution/sumAll-solution.spec.js +++ b/05_sumAll/solution/sumAll-solution.spec.js @@ -1,25 +1,25 @@ -const sumAll = require("./sumAll"); +const sumAll = require('./sumAll-solution'); -describe("sumAll", () => { - test("sums numbers within the range", () => { +describe('sumAll', () => { + test('sums numbers within the range', () => { expect(sumAll(1, 4)).toEqual(10); }); - test.skip("works with large numbers", () => { + test.skip('works with large numbers', () => { expect(sumAll(1, 4000)).toEqual(8002000); }); - test.skip("works with larger number first", () => { + test.skip('works with larger number first', () => { expect(sumAll(123, 1)).toEqual(7626); }); - test.skip("returns ERROR with negative numbers", () => { - expect(sumAll(-10, 4)).toEqual("ERROR"); + test.skip('returns ERROR with negative numbers', () => { + expect(sumAll(-10, 4)).toEqual('ERROR'); }); - test.skip("returns ERROR with non-integer parameters", () => { - expect(sumAll(2.5, 4)).toEqual("ERROR"); + test.skip('returns ERROR with non-integer parameters', () => { + expect(sumAll(2.5, 4)).toEqual('ERROR'); }); - test.skip("returns ERROR with non-number parameters", () => { - expect(sumAll(10, "90")).toEqual("ERROR"); + test.skip('returns ERROR with non-number parameters', () => { + expect(sumAll(10, '90')).toEqual('ERROR'); }); - test.skip("returns ERROR with non-number parameters", () => { - expect(sumAll(10, [90, 1])).toEqual("ERROR"); + test.skip('returns ERROR with non-number parameters', () => { + expect(sumAll(10, [90, 1])).toEqual('ERROR'); }); }); diff --git a/06_leapYears/solution/leapYears-solution.spec.js b/06_leapYears/solution/leapYears-solution.spec.js index 01658ac..3afd656 100644 --- a/06_leapYears/solution/leapYears-solution.spec.js +++ b/06_leapYears/solution/leapYears-solution.spec.js @@ -1,22 +1,22 @@ -const leapYears = require("./leapYears"); +const leapYears = require('./leapYears-solution'); -describe("leapYears", () => { - test("works with non century years", () => { +describe('leapYears', () => { + test('works with non century years', () => { expect(leapYears(1996)).toBe(true); }); - test.skip("works with non century years", () => { + test.skip('works with non century years', () => { expect(leapYears(1997)).toBe(false); }); - test.skip("works with ridiculously futuristic non century years", () => { + test.skip('works with ridiculously futuristic non century years', () => { expect(leapYears(34992)).toBe(true); }); - test.skip("works with century years", () => { + test.skip('works with century years', () => { expect(leapYears(1900)).toBe(false); }); - test.skip("works with century years", () => { + test.skip('works with century years', () => { expect(leapYears(1600)).toBe(true); }); - test.skip("works with century years", () => { + test.skip('works with century years', () => { expect(leapYears(700)).toBe(false); }); }); diff --git a/07_tempConversion/solution/tempConversion-solution.spec.js b/07_tempConversion/solution/tempConversion-solution.spec.js index 7a9e8c9..27a840a 100644 --- a/07_tempConversion/solution/tempConversion-solution.spec.js +++ b/07_tempConversion/solution/tempConversion-solution.spec.js @@ -1,25 +1,28 @@ -const { convertToCelsius, convertToFahrenheit } = require("./tempConversion"); +const { + convertToCelsius, + convertToFahrenheit, +} = require('./tempConversion-solution'); -describe("convertToCelsius", () => { - test("works", () => { +describe('convertToCelsius', () => { + test('works', () => { expect(convertToCelsius(32)).toEqual(0); }); - test.skip("rounds to 1 decimal", () => { + test.skip('rounds to 1 decimal', () => { expect(convertToCelsius(100)).toEqual(37.8); }); - test.skip("works with negatives", () => { + test.skip('works with negatives', () => { expect(convertToCelsius(-100)).toEqual(-73.3); }); }); -describe("convertToFahrenheit", () => { - test.skip("works", () => { +describe('convertToFahrenheit', () => { + test.skip('works', () => { expect(convertToFahrenheit(0)).toEqual(32); }); - test.skip("rounds to 1 decimal", () => { + test.skip('rounds to 1 decimal', () => { expect(convertToFahrenheit(73.2)).toEqual(163.8); }); - test.skip("works with negatives", () => { + test.skip('works with negatives', () => { expect(convertToFahrenheit(-10)).toEqual(14); }); }); diff --git a/08_calculator/solution/calculator-solution.spec.js b/08_calculator/solution/calculator-solution.spec.js index b1f3935..0e1090c 100644 --- a/08_calculator/solution/calculator-solution.spec.js +++ b/08_calculator/solution/calculator-solution.spec.js @@ -1,77 +1,77 @@ -const calculator = require("./calculator"); +const calculator = require('./calculator-solution'); -describe("add", () => { - test("adds 0 and 0", () => { +describe('add', () => { + test('adds 0 and 0', () => { expect(calculator.add(0, 0)).toBe(0); }); - test.skip("adds 2 and 2", () => { + test.skip('adds 2 and 2', () => { expect(calculator.add(2, 2)).toBe(4); }); - test.skip("adds positive numbers", () => { + test.skip('adds positive numbers', () => { expect(calculator.add(2, 6)).toBe(8); }); }); -describe("subtract", () => { - test.skip("subtracts numbers", () => { +describe('subtract', () => { + test.skip('subtracts numbers', () => { expect(calculator.subtract(10, 4)).toBe(6); }); }); -describe("sum", () => { - test.skip("computes the sum of an empty array", () => { +describe('sum', () => { + test.skip('computes the sum of an empty array', () => { expect(calculator.sum([])).toBe(0); }); - test.skip("computes the sum of an array of one number", () => { + test.skip('computes the sum of an array of one number', () => { expect(calculator.sum([7])).toBe(7); }); - test.skip("computes the sum of an array of two numbers", () => { + test.skip('computes the sum of an array of two numbers', () => { expect(calculator.sum([7, 11])).toBe(18); }); - test.skip("computes the sum of an array of many numbers", () => { + test.skip('computes the sum of an array of many numbers', () => { expect(calculator.sum([1, 3, 5, 7, 9])).toBe(25); }); }); -describe("multiply", () => { - test.skip("multiplies two numbers", () => { +describe('multiply', () => { + test.skip('multiplies two numbers', () => { expect(calculator.multiply([2, 4])).toBe(8); }); - test.skip("multiplies several numbers", () => { + test.skip('multiplies several numbers', () => { expect(calculator.multiply([2, 4, 6, 8, 10, 12, 14])).toBe(645120); }); }); -describe("power", () => { - test.skip("raises one number to the power of another number", () => { +describe('power', () => { + test.skip('raises one number to the power of another number', () => { expect(calculator.power(4, 3)).toBe(64); // 4 to third power is 64 }); }); -describe("factorial", () => { - test.skip("computes the factorial of 0", () => { +describe('factorial', () => { + test.skip('computes the factorial of 0', () => { expect(calculator.factorial(0)).toBe(1); // 0! = 1 }); - test.skip("computes the factorial of 1", () => { + test.skip('computes the factorial of 1', () => { expect(calculator.factorial(1)).toBe(1); }); - test.skip("computes the factorial of 2", () => { + test.skip('computes the factorial of 2', () => { expect(calculator.factorial(2)).toBe(2); }); - test.skip("computes the factorial of 5", () => { + test.skip('computes the factorial of 5', () => { expect(calculator.factorial(5)).toBe(120); }); - test.skip("computes the factorial of 10", () => { + test.skip('computes the factorial of 10', () => { expect(calculator.factorial(10)).toBe(3628800); }); }); diff --git a/09_palindromes/solution/palindromes-solution.spec.js b/09_palindromes/solution/palindromes-solution.spec.js index f94c207..b1f5d41 100644 --- a/09_palindromes/solution/palindromes-solution.spec.js +++ b/09_palindromes/solution/palindromes-solution.spec.js @@ -1,24 +1,24 @@ -const palindromes = require("./palindromes"); +const palindromes = require('./palindromes-solution'); -describe("palindromes", () => { - test("works with single words", () => { - expect(palindromes("racecar")).toBe(true); +describe('palindromes', () => { + test('works with single words', () => { + expect(palindromes('racecar')).toBe(true); }); - test.skip("works with punctuation ", () => { - expect(palindromes("racecar!")).toBe(true); + test.skip('works with punctuation ', () => { + expect(palindromes('racecar!')).toBe(true); }); - test.skip("works with upper-case letters ", () => { - expect(palindromes("Racecar!")).toBe(true); + test.skip('works with upper-case letters ', () => { + expect(palindromes('Racecar!')).toBe(true); }); - test.skip("works with multiple words", () => { - expect(palindromes("A car, a man, a maraca.")).toBe(true); + test.skip('works with multiple words', () => { + expect(palindromes('A car, a man, a maraca.')).toBe(true); }); - test.skip("works with multiple words", () => { - expect(palindromes("Animal loots foliated detail of stool lamina.")).toBe( + test.skip('works with multiple words', () => { + expect(palindromes('Animal loots foliated detail of stool lamina.')).toBe( true ); }); test.skip("doesn't just always return true", () => { - expect(palindromes("ZZZZ car, a man, a maraca.")).toBe(false); + expect(palindromes('ZZZZ car, a man, a maraca.')).toBe(false); }); }); diff --git a/10_fibonacci/solution/fibonacci-solution.spec.js b/10_fibonacci/solution/fibonacci-solution.spec.js index bd1ab92..abc6ffd 100644 --- a/10_fibonacci/solution/fibonacci-solution.spec.js +++ b/10_fibonacci/solution/fibonacci-solution.spec.js @@ -1,31 +1,31 @@ -const fibonacci = require("./fibonacci"); +const fibonacci = require('./fibonacci-solution'); -describe("fibonacci", () => { - test("4th fibonacci number is 3", () => { +describe('fibonacci', () => { + test('4th fibonacci number is 3', () => { expect(fibonacci(4)).toBe(3); }); - test.skip("6th fibonacci number is 8", () => { + test.skip('6th fibonacci number is 8', () => { expect(fibonacci(6)).toBe(8); }); - test.skip("10th fibonacci number is 55", () => { + test.skip('10th fibonacci number is 55', () => { expect(fibonacci(10)).toBe(55); }); - test.skip("15th fibonacci number is 610", () => { + test.skip('15th fibonacci number is 610', () => { expect(fibonacci(15)).toBe(610); }); - test.skip("25th fibonacci number is 75025", () => { + test.skip('25th fibonacci number is 75025', () => { expect(fibonacci(25)).toBe(75025); }); test.skip("doesn't accept negatives", () => { - expect(fibonacci(-25)).toBe("OOPS"); + expect(fibonacci(-25)).toBe('OOPS'); }); - test.skip("DOES accept strings", () => { - expect(fibonacci("1")).toBe(1); + test.skip('DOES accept strings', () => { + expect(fibonacci('1')).toBe(1); }); - test.skip("DOES accept strings", () => { - expect(fibonacci("2")).toBe(1); + test.skip('DOES accept strings', () => { + expect(fibonacci('2')).toBe(1); }); - test.skip("DOES accept strings", () => { - expect(fibonacci("8")).toBe(21); + test.skip('DOES accept strings', () => { + expect(fibonacci('8')).toBe(21); }); }); diff --git a/11_getTheTitles/solution/getTheTitles-solution.spec.js b/11_getTheTitles/solution/getTheTitles-solution.spec.js index e6a00f7..37e01dd 100644 --- a/11_getTheTitles/solution/getTheTitles-solution.spec.js +++ b/11_getTheTitles/solution/getTheTitles-solution.spec.js @@ -1,18 +1,18 @@ -const getTheTitles = require("./getTheTitles"); +const getTheTitles = require('./getTheTitles-solution'); -describe("getTheTitles", () => { +describe('getTheTitles', () => { const books = [ { - title: "Book", - author: "Name", + title: 'Book', + author: 'Name', }, { - title: "Book2", - author: "Name2", + title: 'Book2', + author: 'Name2', }, ]; - test("gets titles", () => { - expect(getTheTitles(books)).toEqual(["Book", "Book2"]); + test('gets titles', () => { + expect(getTheTitles(books)).toEqual(['Book', 'Book2']); }); }); diff --git a/12_findTheOldest/solution/findTheOldest-solution.spec.js b/12_findTheOldest/solution/findTheOldest-solution.spec.js index 9f16fdf..9b47c12 100644 --- a/12_findTheOldest/solution/findTheOldest-solution.spec.js +++ b/12_findTheOldest/solution/findTheOldest-solution.spec.js @@ -1,62 +1,62 @@ -const findTheOldest = require("./findTheOldest"); +const findTheOldest = require('./findTheOldest-solution'); -describe("findTheOldest", () => { - test("finds the oldest person!", () => { +describe('findTheOldest', () => { + test('finds the oldest person!', () => { const people = [ { - name: "Carly", + name: 'Carly', yearOfBirth: 1942, yearOfDeath: 1970, }, { - name: "Ray", + name: 'Ray', yearOfBirth: 1962, yearOfDeath: 2011, }, { - name: "Jane", + name: 'Jane', yearOfBirth: 1912, yearOfDeath: 1941, }, ]; - expect(findTheOldest(people).name).toBe("Ray"); + expect(findTheOldest(people).name).toBe('Ray'); }); - test.skip("finds the oldest person if someone is still living", () => { + test.skip('finds the oldest person if someone is still living', () => { const people = [ { - name: "Carly", + name: 'Carly', yearOfBirth: 2018, }, { - name: "Ray", + name: 'Ray', yearOfBirth: 1962, yearOfDeath: 2011, }, { - name: "Jane", + name: 'Jane', yearOfBirth: 1912, yearOfDeath: 1941, }, ]; - expect(findTheOldest(people).name).toBe("Ray"); + expect(findTheOldest(people).name).toBe('Ray'); }); - test.skip("finds the oldest person if the OLDEST is still living", () => { + test.skip('finds the oldest person if the OLDEST is still living', () => { const people = [ { - name: "Carly", + name: 'Carly', yearOfBirth: 1066, }, { - name: "Ray", + name: 'Ray', yearOfBirth: 1962, yearOfDeath: 2011, }, { - name: "Jane", + name: 'Jane', yearOfBirth: 1912, yearOfDeath: 1941, }, ]; - expect(findTheOldest(people).name).toBe("Carly"); + expect(findTheOldest(people).name).toBe('Carly'); }); }); diff --git a/13_caesar/solution/caesar-solution.spec.js b/13_caesar/solution/caesar-solution.spec.js index 87fc253..55e3852 100644 --- a/13_caesar/solution/caesar-solution.spec.js +++ b/13_caesar/solution/caesar-solution.spec.js @@ -1,23 +1,23 @@ -const caesar = require("./caesar"); +const caesar = require('./caesar-solution'); -test("works with single letters", () => { - expect(caesar("A", 1)).toBe("B"); +test('works with single letters', () => { + expect(caesar('A', 1)).toBe('B'); }); -test.skip("works with words", () => { - expect(caesar("Aaa", 1)).toBe("Bbb"); +test.skip('works with words', () => { + expect(caesar('Aaa', 1)).toBe('Bbb'); }); -test.skip("works with phrases", () => { - expect(caesar("Hello, World!", 5)).toBe("Mjqqt, Btwqi!"); +test.skip('works with phrases', () => { + expect(caesar('Hello, World!', 5)).toBe('Mjqqt, Btwqi!'); }); -test.skip("works with negative shift", () => { - expect(caesar("Mjqqt, Btwqi!", -5)).toBe("Hello, World!"); +test.skip('works with negative shift', () => { + expect(caesar('Mjqqt, Btwqi!', -5)).toBe('Hello, World!'); }); -test.skip("wraps", () => { - expect(caesar("Z", 1)).toBe("A"); +test.skip('wraps', () => { + expect(caesar('Z', 1)).toBe('A'); }); -test.skip("works with large shift factors", () => { - expect(caesar("Hello, World!", 75)).toBe("Ebiil, Tloia!"); +test.skip('works with large shift factors', () => { + expect(caesar('Hello, World!', 75)).toBe('Ebiil, Tloia!'); }); -test.skip("works with large negative shift factors", () => { - expect(caesar("Hello, World!", -29)).toBe("Ebiil, Tloia!"); +test.skip('works with large negative shift factors', () => { + expect(caesar('Hello, World!', -29)).toBe('Ebiil, Tloia!'); }); diff --git a/pigLatin/README.md b/archived_pigLatin/README.md similarity index 100% rename from pigLatin/README.md rename to archived_pigLatin/README.md diff --git a/pigLatin/pigLatin.js b/archived_pigLatin/pigLatin.js similarity index 100% rename from pigLatin/pigLatin.js rename to archived_pigLatin/pigLatin.js diff --git a/pigLatin/pigLatin.spec.js b/archived_pigLatin/pigLatin.spec.js similarity index 100% rename from pigLatin/pigLatin.spec.js rename to archived_pigLatin/pigLatin.spec.js diff --git a/pigLatin/solution/pigLatin-solution.js b/archived_pigLatin/solution/pigLatin-solution.js similarity index 100% rename from pigLatin/solution/pigLatin-solution.js rename to archived_pigLatin/solution/pigLatin-solution.js diff --git a/pigLatin/solution/pigLatin-solution.spec.js b/archived_pigLatin/solution/pigLatin-solution.spec.js similarity index 53% rename from pigLatin/solution/pigLatin-solution.spec.js rename to archived_pigLatin/solution/pigLatin-solution.spec.js index cb6e836..dbcd5a1 100644 --- a/pigLatin/solution/pigLatin-solution.spec.js +++ b/archived_pigLatin/solution/pigLatin-solution.spec.js @@ -1,4 +1,4 @@ -const pigLatin = require("./pigLatin"); +const pigLatin = require('./pigLatin-solution'); // Topics @@ -17,40 +17,40 @@ const pigLatin = require("./pigLatin"); // See https://en.wikipedia.org/wiki/Pig_Latin for more details. -describe("translate", () => { - test("translates a word beginning with a vowel", () => { - expect(pigLatin("apple")).toBe("appleay"); +describe('translate', () => { + test('translates a word beginning with a vowel', () => { + expect(pigLatin('apple')).toBe('appleay'); }); - test.skip("translates a word beginning with a consonant", () => { - expect(pigLatin("banana")).toBe("ananabay"); + test.skip('translates a word beginning with a consonant', () => { + expect(pigLatin('banana')).toBe('ananabay'); }); - test.skip("translates a word beginning with two consonants", () => { - expect(pigLatin("cherry")).toBe("errychay"); + test.skip('translates a word beginning with two consonants', () => { + expect(pigLatin('cherry')).toBe('errychay'); }); - test.skip("translates two words", () => { - expect(pigLatin("eat pie")).toBe("eatay iepay"); + test.skip('translates two words', () => { + expect(pigLatin('eat pie')).toBe('eatay iepay'); }); - test.skip("translates a word beginning with three consonants", () => { - expect(pigLatin("three")).toBe("eethray"); + test.skip('translates a word beginning with three consonants', () => { + expect(pigLatin('three')).toBe('eethray'); }); test.skip('counts "sch" as a single phoneme', () => { - expect(pigLatin("school")).toBe("oolschay"); + expect(pigLatin('school')).toBe('oolschay'); }); test.skip('counts "qu" as a single phoneme', () => { - expect(pigLatin("quiet")).toBe("ietquay"); + expect(pigLatin('quiet')).toBe('ietquay'); }); test.skip('counts "qu" as a consonant even when its preceded by a consonant', () => { - expect(pigLatin("square")).toBe("aresquay"); + expect(pigLatin('square')).toBe('aresquay'); }); - test.skip("translates many words", () => { - expect(pigLatin("the quick brown fox")).toBe("ethay ickquay ownbray oxfay"); + test.skip('translates many words', () => { + expect(pigLatin('the quick brown fox')).toBe('ethay ickquay ownbray oxfay'); }); }); diff --git a/snakeCase/README.md b/archived_snakeCase/README.md similarity index 100% rename from snakeCase/README.md rename to archived_snakeCase/README.md diff --git a/snakeCase/snakeCase.js b/archived_snakeCase/snakeCase.js similarity index 100% rename from snakeCase/snakeCase.js rename to archived_snakeCase/snakeCase.js diff --git a/snakeCase/snakeCase.spec.js b/archived_snakeCase/snakeCase.spec.js similarity index 100% rename from snakeCase/snakeCase.spec.js rename to archived_snakeCase/snakeCase.spec.js diff --git a/snakeCase/solution/snakeCase-solution.js b/archived_snakeCase/solution/snakeCase-solution.js similarity index 100% rename from snakeCase/solution/snakeCase-solution.js rename to archived_snakeCase/solution/snakeCase-solution.js diff --git a/archived_snakeCase/solution/snakeCase-solution.spec.js b/archived_snakeCase/solution/snakeCase-solution.spec.js new file mode 100644 index 0000000..37cd499 --- /dev/null +++ b/archived_snakeCase/solution/snakeCase-solution.spec.js @@ -0,0 +1,26 @@ +const snakeCase = require('./snakeCase-solution'); + +describe('snakeCase', () => { + test('works with simple lowercased phrases', () => { + expect(snakeCase('hello world')).toEqual('hello_world'); + }); + test.skip('works with Caps and punctuation', () => { + expect(snakeCase('Hello, World???')).toEqual('hello_world'); + }); + test.skip('works with longer phrases', () => { + expect(snakeCase('This is the song that never ends....')).toEqual( + 'this_is_the_song_that_never_ends' + ); + }); + test.skip('works with camel case', () => { + expect(snakeCase('snakeCase')).toEqual('snake_case'); + }); + test.skip('works with kebab case', () => { + expect(snakeCase('snake-case')).toEqual('snake_case'); + }); + test.skip('works with WTF case', () => { + expect(snakeCase('SnAkE..CaSe..Is..AwEsOmE')).toEqual( + 'snake_case_is_awesome' + ); + }); +}); diff --git a/snakeCase/solution/snakeCase-solution.spec.js b/snakeCase/solution/snakeCase-solution.spec.js deleted file mode 100644 index b8620a2..0000000 --- a/snakeCase/solution/snakeCase-solution.spec.js +++ /dev/null @@ -1,26 +0,0 @@ -const snakeCase = require("./snakeCase"); - -describe("snakeCase", () => { - test("works with simple lowercased phrases", () => { - expect(snakeCase("hello world")).toEqual("hello_world"); - }); - test.skip("works with Caps and punctuation", () => { - expect(snakeCase("Hello, World???")).toEqual("hello_world"); - }); - test.skip("works with longer phrases", () => { - expect(snakeCase("This is the song that never ends....")).toEqual( - "this_is_the_song_that_never_ends" - ); - }); - test.skip("works with camel case", () => { - expect(snakeCase("snakeCase")).toEqual("snake_case"); - }); - test.skip("works with kebab case", () => { - expect(snakeCase("snake-case")).toEqual("snake_case"); - }); - test.skip("works with WTF case", () => { - expect(snakeCase("SnAkE..CaSe..Is..AwEsOmE")).toEqual( - "snake_case_is_awesome" - ); - }); -});