Skip to content

Commit

Permalink
🌝
Browse files Browse the repository at this point in the history
  • Loading branch information
yankouskia committed Feb 16, 2018
1 parent a855dbf commit 75f068c
Show file tree
Hide file tree
Showing 5 changed files with 258 additions and 0 deletions.
14 changes: 14 additions & 0 deletions README.md
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
195 changes: 195 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions package.json
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"
}
}
3 changes: 3 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = function warmup(temperature) {
// your implementation here
};
24 changes: 24 additions & 0 deletions test.js
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);
});
});

0 comments on commit 75f068c

Please sign in to comment.