forked from yankouskia/warmup
-
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
yankouskia
committed
Feb 16, 2018
1 parent
a855dbf
commit 75f068c
Showing
5 changed files
with
258 additions
and
0 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 |
---|---|---|
@@ -1,2 +1,16 @@ | ||
# warmup | ||
Let's warm up! | ||
|
||
## Task | ||
|
||
Your task is to implement function, which converts Celsius to Fahrenheit. | ||
Write your solution in `src/index.js` | ||
|
||
## Prepare and test | ||
|
||
- Install [Node.js](https://nodejs.org/en/) | ||
- Clone this repository: `git clone https://github.com/yankouskia/sorter.git` | ||
- Go to folder `sorter` | ||
- Run `npm install` in command line | ||
- Run `npm test` in command line | ||
- You will see the number of passing and failing tests |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,22 @@ | ||
{ | ||
"name": "warmup", | ||
"version": "1.0.0", | ||
"description": "Let's warm up!", | ||
"main": "test.js", | ||
"scripts": { | ||
"test": "mocha test.js" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/yankouskia/warmup.git" | ||
}, | ||
"author": "", | ||
"license": "ISC", | ||
"bugs": { | ||
"url": "https://github.com/yankouskia/warmup/issues" | ||
}, | ||
"homepage": "https://github.com/yankouskia/warmup#readme", | ||
"devDependencies": { | ||
"mocha": "^5.0.1" | ||
} | ||
} |
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,3 @@ | ||
module.exports = function warmup(temperature) { | ||
// your implementation here | ||
}; |
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,24 @@ | ||
const assert = require('assert'); | ||
const warmup = require('./src/index.js'); | ||
|
||
describe('warmup', () => { | ||
it('warm cold', () => { | ||
const fahrenheit = warmup(-20); | ||
assert.deepEqual(fahrenheit, -4); | ||
}); | ||
|
||
it('warm cool', () => { | ||
const fahrenheit = warmup(0); | ||
assert.deepEqual(fahrenheit, 32); | ||
}); | ||
|
||
it('warm medium', () => { | ||
const fahrenheit = warmup(15); | ||
assert.deepEqual(fahrenheit, 59); | ||
}); | ||
|
||
it('warm hot', () => { | ||
const fahrenheit = warmup(40); | ||
assert.deepEqual(fahrenheit, 104); | ||
}); | ||
}); |