forked from TheOdinProject/javascript-exercises
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
46 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.vscode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# 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. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
var ftoc = function() { | ||
|
||
} | ||
|
||
var ctof = function() { | ||
|
||
} | ||
|
||
module.exports = { | ||
ftoc, | ||
ctof | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters