Skip to content

Commit

Permalink
feat: square root failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
adekunleoduye committed Aug 26, 2021
0 parents commit 24a8f2e
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules
.DS_Store

yarn.lock
yarn-error.log
5 changes: 5 additions & 0 deletions babel.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"presets": [
"@babel/preset-env"
]
}
28 changes: 28 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"dependencies": {
"@babel/preset-env": "^7.15.0",
"jest": "^27.0.6"
},
"scripts": {
"test": "jest"
},
"name": "tdd-examples",
"version": "1.0.0",
"main": "squareRoot.js",
"devDependencies": {},
"repository": {
"type": "git",
"url": "git+https://github.com/adekunleoduye/tdd-examples.git"
},
"author": "Adekunle Oduye",
"license": "ISC",
"bugs": {
"url": "https://github.com/adekunleoduye/tdd-examples/issues"
},
"homepage": "https://github.com/adekunleoduye/tdd-examples#readme",
"description": "TDD in javascript",
"keywords": [
"javascript",
"tdd"
]
}
Empty file added squareRoot.js
Empty file.
10 changes: 10 additions & 0 deletions squareRoot.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import squareRoot from 'squareRoot.js'

describe('Squareroot', () => {
it("Should output number's square", () => {
const acutal = squareRoot(3);
const expected = 9;

expect(acutal).toEqual(expected);
})
})

0 comments on commit 24a8f2e

Please sign in to comment.