Skip to content

Commit 2ec0f43

Browse files
committed
Updated file paths
1 parent a092bf0 commit 2ec0f43

File tree

24 files changed

+207
-204
lines changed

24 files changed

+207
-204
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
const helloWorld = require("./helloWorld");
1+
const helloWorld = require('./helloWorld-solution');
22

3-
describe("Hello World", function () {
3+
describe('Hello World', function () {
44
test('says "Hello, World!"', function () {
5-
expect(helloWorld()).toEqual("Hello, World!");
5+
expect(helloWorld()).toEqual('Hello, World!');
66
});
77
});
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
const repeatString = require("./repeatString");
1+
const repeatString = require('./repeatString-solution');
22

3-
describe("repeatString", () => {
4-
test("repeats the string", () => {
5-
expect(repeatString("hey", 3)).toEqual("heyheyhey");
3+
describe('repeatString', () => {
4+
test('repeats the string', () => {
5+
expect(repeatString('hey', 3)).toEqual('heyheyhey');
66
});
7-
test.skip("repeats the string many times", () => {
8-
expect(repeatString("hey", 10)).toEqual("heyheyheyheyheyheyheyheyheyhey");
7+
test.skip('repeats the string many times', () => {
8+
expect(repeatString('hey', 10)).toEqual('heyheyheyheyheyheyheyheyheyhey');
99
});
10-
test.skip("repeats the string 1 times", () => {
11-
expect(repeatString("hey", 1)).toEqual("hey");
10+
test.skip('repeats the string 1 times', () => {
11+
expect(repeatString('hey', 1)).toEqual('hey');
1212
});
13-
test.skip("repeats the string 0 times", () => {
14-
expect(repeatString("hey", 0)).toEqual("");
13+
test.skip('repeats the string 0 times', () => {
14+
expect(repeatString('hey', 0)).toEqual('');
1515
});
16-
test.skip("returns ERROR with negative numbers", () => {
17-
expect(repeatString("hey", -1)).toEqual("ERROR");
16+
test.skip('returns ERROR with negative numbers', () => {
17+
expect(repeatString('hey', -1)).toEqual('ERROR');
1818
});
19-
test.skip("repeats the string a random amount of times", function () {
19+
test.skip('repeats the string a random amount of times', function () {
2020
/*The number is generated by using Math.random to get a value from between
2121
0 to 1, when this is multiplied by 1000 and rounded down with Math.floor it
2222
equals a number between 0 to 999 (this number will change everytime you run
@@ -29,11 +29,11 @@ describe("repeatString", () => {
2929
/*The .match(/((hey))/g).length is a regex that will count the number of heys
3030
in the result, which if your function works correctly will equal the number that
3131
was randomaly generated. */
32-
expect(repeatString("hey", number).match(/((hey))/g).length).toEqual(
32+
expect(repeatString('hey', number).match(/((hey))/g).length).toEqual(
3333
number
3434
);
3535
});
36-
test.skip("works with blank strings", () => {
37-
expect(repeatString("", 10)).toEqual("");
36+
test.skip('works with blank strings', () => {
37+
expect(repeatString('', 10)).toEqual('');
3838
});
3939
});
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
const reverseString = require("./reverseString");
1+
const reverseString = require('./reverseString-solution');
22

3-
describe("reverseString", () => {
4-
test("reverses single word", () => {
5-
expect(reverseString("hello")).toEqual("olleh");
3+
describe('reverseString', () => {
4+
test('reverses single word', () => {
5+
expect(reverseString('hello')).toEqual('olleh');
66
});
77

8-
test.skip("reverses multiple words", () => {
9-
expect(reverseString("hello there")).toEqual("ereht olleh");
8+
test.skip('reverses multiple words', () => {
9+
expect(reverseString('hello there')).toEqual('ereht olleh');
1010
});
1111

12-
test.skip("works with numbers and punctuation", () => {
13-
expect(reverseString("123! abc!")).toEqual("!cba !321");
12+
test.skip('works with numbers and punctuation', () => {
13+
expect(reverseString('123! abc!')).toEqual('!cba !321');
1414
});
15-
test.skip("works with blank strings", () => {
16-
expect(reverseString("")).toEqual("");
15+
test.skip('works with blank strings', () => {
16+
expect(reverseString('')).toEqual('');
1717
});
1818
});
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
1-
const removeFromArray = require("./removeFromArray");
1+
const removeFromArray = require('./removeFromArray-solution');
22

3-
describe("removeFromArray", () => {
4-
test("removes a single value", () => {
3+
describe('removeFromArray', () => {
4+
test('removes a single value', () => {
55
expect(removeFromArray([1, 2, 3, 4], 3)).toEqual([1, 2, 4]);
66
});
7-
test.skip("removes multiple values", () => {
7+
test.skip('removes multiple values', () => {
88
expect(removeFromArray([1, 2, 3, 4], 3, 2)).toEqual([1, 4]);
99
});
10-
test.skip("ignores non present values", () => {
11-
expect(removeFromArray([1, 2, 3, 4], 7, "tacos")).toEqual([1, 2, 3, 4]);
10+
test.skip('ignores non present values', () => {
11+
expect(removeFromArray([1, 2, 3, 4], 7, 'tacos')).toEqual([1, 2, 3, 4]);
1212
});
13-
test.skip("ignores non present values, but still works", () => {
13+
test.skip('ignores non present values, but still works', () => {
1414
expect(removeFromArray([1, 2, 3, 4], 7, 2)).toEqual([1, 3, 4]);
1515
});
16-
test.skip("can remove all values", () => {
16+
test.skip('can remove all values', () => {
1717
expect(removeFromArray([1, 2, 3, 4], 1, 2, 3, 4)).toEqual([]);
1818
});
19-
test.skip("works with strings", () => {
20-
expect(removeFromArray(["hey", 2, 3, "ho"], "hey", 3)).toEqual([2, "ho"]);
19+
test.skip('works with strings', () => {
20+
expect(removeFromArray(['hey', 2, 3, 'ho'], 'hey', 3)).toEqual([2, 'ho']);
2121
});
22-
test.skip("only removes same type", () => {
23-
expect(removeFromArray([1, 2, 3], "1", 3)).toEqual([1, 2]);
22+
test.skip('only removes same type', () => {
23+
expect(removeFromArray([1, 2, 3], '1', 3)).toEqual([1, 2]);
2424
});
2525
});
+13-13
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
1-
const sumAll = require("./sumAll");
1+
const sumAll = require('./sumAll-solution');
22

3-
describe("sumAll", () => {
4-
test("sums numbers within the range", () => {
3+
describe('sumAll', () => {
4+
test('sums numbers within the range', () => {
55
expect(sumAll(1, 4)).toEqual(10);
66
});
7-
test.skip("works with large numbers", () => {
7+
test.skip('works with large numbers', () => {
88
expect(sumAll(1, 4000)).toEqual(8002000);
99
});
10-
test.skip("works with larger number first", () => {
10+
test.skip('works with larger number first', () => {
1111
expect(sumAll(123, 1)).toEqual(7626);
1212
});
13-
test.skip("returns ERROR with negative numbers", () => {
14-
expect(sumAll(-10, 4)).toEqual("ERROR");
13+
test.skip('returns ERROR with negative numbers', () => {
14+
expect(sumAll(-10, 4)).toEqual('ERROR');
1515
});
16-
test.skip("returns ERROR with non-integer parameters", () => {
17-
expect(sumAll(2.5, 4)).toEqual("ERROR");
16+
test.skip('returns ERROR with non-integer parameters', () => {
17+
expect(sumAll(2.5, 4)).toEqual('ERROR');
1818
});
19-
test.skip("returns ERROR with non-number parameters", () => {
20-
expect(sumAll(10, "90")).toEqual("ERROR");
19+
test.skip('returns ERROR with non-number parameters', () => {
20+
expect(sumAll(10, '90')).toEqual('ERROR');
2121
});
22-
test.skip("returns ERROR with non-number parameters", () => {
23-
expect(sumAll(10, [90, 1])).toEqual("ERROR");
22+
test.skip('returns ERROR with non-number parameters', () => {
23+
expect(sumAll(10, [90, 1])).toEqual('ERROR');
2424
});
2525
});
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
const leapYears = require("./leapYears");
1+
const leapYears = require('./leapYears-solution');
22

3-
describe("leapYears", () => {
4-
test("works with non century years", () => {
3+
describe('leapYears', () => {
4+
test('works with non century years', () => {
55
expect(leapYears(1996)).toBe(true);
66
});
7-
test.skip("works with non century years", () => {
7+
test.skip('works with non century years', () => {
88
expect(leapYears(1997)).toBe(false);
99
});
10-
test.skip("works with ridiculously futuristic non century years", () => {
10+
test.skip('works with ridiculously futuristic non century years', () => {
1111
expect(leapYears(34992)).toBe(true);
1212
});
13-
test.skip("works with century years", () => {
13+
test.skip('works with century years', () => {
1414
expect(leapYears(1900)).toBe(false);
1515
});
16-
test.skip("works with century years", () => {
16+
test.skip('works with century years', () => {
1717
expect(leapYears(1600)).toBe(true);
1818
});
19-
test.skip("works with century years", () => {
19+
test.skip('works with century years', () => {
2020
expect(leapYears(700)).toBe(false);
2121
});
2222
});
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,28 @@
1-
const { convertToCelsius, convertToFahrenheit } = require("./tempConversion");
1+
const {
2+
convertToCelsius,
3+
convertToFahrenheit,
4+
} = require('./tempConversion-solution');
25

3-
describe("convertToCelsius", () => {
4-
test("works", () => {
6+
describe('convertToCelsius', () => {
7+
test('works', () => {
58
expect(convertToCelsius(32)).toEqual(0);
69
});
7-
test.skip("rounds to 1 decimal", () => {
10+
test.skip('rounds to 1 decimal', () => {
811
expect(convertToCelsius(100)).toEqual(37.8);
912
});
10-
test.skip("works with negatives", () => {
13+
test.skip('works with negatives', () => {
1114
expect(convertToCelsius(-100)).toEqual(-73.3);
1215
});
1316
});
1417

15-
describe("convertToFahrenheit", () => {
16-
test.skip("works", () => {
18+
describe('convertToFahrenheit', () => {
19+
test.skip('works', () => {
1720
expect(convertToFahrenheit(0)).toEqual(32);
1821
});
19-
test.skip("rounds to 1 decimal", () => {
22+
test.skip('rounds to 1 decimal', () => {
2023
expect(convertToFahrenheit(73.2)).toEqual(163.8);
2124
});
22-
test.skip("works with negatives", () => {
25+
test.skip('works with negatives', () => {
2326
expect(convertToFahrenheit(-10)).toEqual(14);
2427
});
2528
});
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,77 @@
1-
const calculator = require("./calculator");
1+
const calculator = require('./calculator-solution');
22

3-
describe("add", () => {
4-
test("adds 0 and 0", () => {
3+
describe('add', () => {
4+
test('adds 0 and 0', () => {
55
expect(calculator.add(0, 0)).toBe(0);
66
});
77

8-
test.skip("adds 2 and 2", () => {
8+
test.skip('adds 2 and 2', () => {
99
expect(calculator.add(2, 2)).toBe(4);
1010
});
1111

12-
test.skip("adds positive numbers", () => {
12+
test.skip('adds positive numbers', () => {
1313
expect(calculator.add(2, 6)).toBe(8);
1414
});
1515
});
1616

17-
describe("subtract", () => {
18-
test.skip("subtracts numbers", () => {
17+
describe('subtract', () => {
18+
test.skip('subtracts numbers', () => {
1919
expect(calculator.subtract(10, 4)).toBe(6);
2020
});
2121
});
2222

23-
describe("sum", () => {
24-
test.skip("computes the sum of an empty array", () => {
23+
describe('sum', () => {
24+
test.skip('computes the sum of an empty array', () => {
2525
expect(calculator.sum([])).toBe(0);
2626
});
2727

28-
test.skip("computes the sum of an array of one number", () => {
28+
test.skip('computes the sum of an array of one number', () => {
2929
expect(calculator.sum([7])).toBe(7);
3030
});
3131

32-
test.skip("computes the sum of an array of two numbers", () => {
32+
test.skip('computes the sum of an array of two numbers', () => {
3333
expect(calculator.sum([7, 11])).toBe(18);
3434
});
3535

36-
test.skip("computes the sum of an array of many numbers", () => {
36+
test.skip('computes the sum of an array of many numbers', () => {
3737
expect(calculator.sum([1, 3, 5, 7, 9])).toBe(25);
3838
});
3939
});
4040

41-
describe("multiply", () => {
42-
test.skip("multiplies two numbers", () => {
41+
describe('multiply', () => {
42+
test.skip('multiplies two numbers', () => {
4343
expect(calculator.multiply([2, 4])).toBe(8);
4444
});
4545

46-
test.skip("multiplies several numbers", () => {
46+
test.skip('multiplies several numbers', () => {
4747
expect(calculator.multiply([2, 4, 6, 8, 10, 12, 14])).toBe(645120);
4848
});
4949
});
5050

51-
describe("power", () => {
52-
test.skip("raises one number to the power of another number", () => {
51+
describe('power', () => {
52+
test.skip('raises one number to the power of another number', () => {
5353
expect(calculator.power(4, 3)).toBe(64); // 4 to third power is 64
5454
});
5555
});
5656

57-
describe("factorial", () => {
58-
test.skip("computes the factorial of 0", () => {
57+
describe('factorial', () => {
58+
test.skip('computes the factorial of 0', () => {
5959
expect(calculator.factorial(0)).toBe(1); // 0! = 1
6060
});
6161

62-
test.skip("computes the factorial of 1", () => {
62+
test.skip('computes the factorial of 1', () => {
6363
expect(calculator.factorial(1)).toBe(1);
6464
});
6565

66-
test.skip("computes the factorial of 2", () => {
66+
test.skip('computes the factorial of 2', () => {
6767
expect(calculator.factorial(2)).toBe(2);
6868
});
6969

70-
test.skip("computes the factorial of 5", () => {
70+
test.skip('computes the factorial of 5', () => {
7171
expect(calculator.factorial(5)).toBe(120);
7272
});
7373

74-
test.skip("computes the factorial of 10", () => {
74+
test.skip('computes the factorial of 10', () => {
7575
expect(calculator.factorial(10)).toBe(3628800);
7676
});
7777
});
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
1-
const palindromes = require("./palindromes");
1+
const palindromes = require('./palindromes-solution');
22

3-
describe("palindromes", () => {
4-
test("works with single words", () => {
5-
expect(palindromes("racecar")).toBe(true);
3+
describe('palindromes', () => {
4+
test('works with single words', () => {
5+
expect(palindromes('racecar')).toBe(true);
66
});
7-
test.skip("works with punctuation ", () => {
8-
expect(palindromes("racecar!")).toBe(true);
7+
test.skip('works with punctuation ', () => {
8+
expect(palindromes('racecar!')).toBe(true);
99
});
10-
test.skip("works with upper-case letters ", () => {
11-
expect(palindromes("Racecar!")).toBe(true);
10+
test.skip('works with upper-case letters ', () => {
11+
expect(palindromes('Racecar!')).toBe(true);
1212
});
13-
test.skip("works with multiple words", () => {
14-
expect(palindromes("A car, a man, a maraca.")).toBe(true);
13+
test.skip('works with multiple words', () => {
14+
expect(palindromes('A car, a man, a maraca.')).toBe(true);
1515
});
16-
test.skip("works with multiple words", () => {
17-
expect(palindromes("Animal loots foliated detail of stool lamina.")).toBe(
16+
test.skip('works with multiple words', () => {
17+
expect(palindromes('Animal loots foliated detail of stool lamina.')).toBe(
1818
true
1919
);
2020
});
2121
test.skip("doesn't just always return true", () => {
22-
expect(palindromes("ZZZZ car, a man, a maraca.")).toBe(false);
22+
expect(palindromes('ZZZZ car, a man, a maraca.')).toBe(false);
2323
});
2424
});

0 commit comments

Comments
 (0)