8000 Update tempConversion function's naming · sabs/javascript-exercises@374252c · GitHub
[go: up one dir, main page]

Skip to content

Commit 374252c

Browse files
committed
Update tempConversion function's naming
1 parent a05d4d6 commit 374252c

File tree

2 files changed

+18
-20
lines changed

2 files changed

+18
-20
lines changed

07_tempConversion/tempConversion.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
const ftoc = function() {
2-
1+
const convertToCelsius = function() {
32
};
43

5-
const ctof = function() {
6-
4+
const convertToFahrenheit = function() {
75
};
86

97
// Do not edit below this line
108
module.exports = {
11-
ftoc,
12-
ctof
9+
convertToCelsius,
10+
convertToFahrenheit
1311
};
Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
1-
const {ftoc, ctof} = require('./tempConversion')
1+
const {convertToCelsius, convertToFahrenheit} = require('./tempConversion')
22

3-
describe('ftoc', () => {
3+
describe('convertToCelsius', () => {
44
test('works', () => {
5-
expect(ftoc(32)).toEqual(0);
5+
expect(convertToCelsius(32)).toEqual(0);
66
});
7-
test.skip('rounds to 1 decimal', () => {
8-
expect(ftoc(100)).toEqual(37.8);
7+
test('rounds to 1 decimal', () => {
8+
expect(convertToCelsius(100)).toEqual(37.8);
99
});
10-
test.skip('works with negatives', () => {
11-
expect(ftoc(-100)).toEqual(-73.3);
10+
test('works with negatives', () => {
11+
expect(convertToCelsius(-100)).toEqual(-73.3);
1212
});
1313
});
1414

15-
describe('ctof', () => {
16-
test.skip('works', () => {
17-
expect(ctof(0)).toEqual(32);
15+
describe('convertToFahrenheit', () => {
16+
test('works', () => {
17+
expect(convertToFahrenheit(0)).toEqual(32);
1818
});
19-
test.skip('rounds to 1 decimal', () => {
20-
expect(ctof(73.2)).toEqual(163.8);
19+
test('rounds to 1 decimal', () => {
20+
expect(convertToFahrenheit(73.2)).toEqual(163.8);
2121
});
22-
test.skip('works with negatives', () => {
23-
expect(ctof(-10)).toEqual(14);
22+
test('works with negatives', () => {
23+
expect(convertToFahrenheit(-10)).toEqual(14);
2424
});
2525
});

0 commit comments

Comments
 (0)
0