8000 calculator/README.md: Removed references to Jasmine. · unconnect/javascript-exercises@2d6c505 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2d6c505

Browse files
author
Michael Frank
committed
calculator/README.md: Removed references to Jasmine.
calculator.spec.js: Set all tests except the first to test.skip
1 parent a5a0284 commit 2d6c505

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

calculator/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ The goal for this exercise is to create a calculator that does the following:
22

33
add, subtract, get the sum, multiply, get the power, and find the factorial
44

5-
In order to do this please fill out each function with your solution. Make sure to return the value so you can test it in Jasmine! To see the expected value
6-
take a look at the spec file that houses the Jasmine test cases.
5+
In order to do this please fill out each function with your solution. Make sure to return the value so you can test it in Jest! To see the expected value
6+
take a look at the spec file that houses the Jest test cases.

calculator/calculator.spec.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,55 @@
1-
const calculator = require ('./calculator.js');
1+
const calculator = require('./calculator');
22

33
describe('add', () => {
44
test('adds 0 and 0', () => {
55
expect(calculator.add(0,0)).toBe(0);
66
});
77

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

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

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

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

28-
test('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('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('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

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

46-
test('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

5151
describe('power', () => {
52-
test('raises one number to the power of another number', () => {
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
});

0 commit comments

Comments
 (0)
0