remove numbering

This commit is contained in:
Cody Loyd
2017-09-20 11:02:31 -05:00
parent 100f940905
commit c501b322f8
18 changed files with 0 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
# Exercise 06 - tempConversion
This exercise asks you to create more than one function so the module.exports section of the spec file looks a little different this time. Nothing to worry about, we're just packaging the functions into an object to be exported.
Write two functions that convert temperatures from Fahrenheit to Celsius (and the other way around):
```
ftoc(32) // fahrenheit to celsius, should return 0
ctof(0) // celsius to fahrenheit, should return 32
```
+12
View File
@@ -0,0 +1,12 @@
var ftoc = function() {
}
var ctof = function() {
}
module.exports = {
ftoc,
ctof
}
+28
View File
@@ -0,0 +1,28 @@
var {ftoc, ctof} = require('./tempConversion')
describe('ftoc', function() {
it('works', function() {
expect(ftoc(32)).toEqual(0);
});
xit('rounds to 1 decimal', function() {
expect(ftoc(100)).toEqual(37.8);
});
xit('works with negatives', function() {
expect(ftoc(-100)).toEqual(-73.3);
});
xit('works', function() {
expect(ctof()).toEqual('ctof');
});
});
describe('ctof', function() {
xit('works', function() {
expect(ctof(0)).toEqual(32);
});
xit('rounds to 1 decimal', function() {
expect(ctof(73.2)).toEqual(163.8);
});
xit('works with negatives', function() {
expect(ctof(-10)).toEqual(14);
});
});