diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 0000000..7f419db --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,28 @@ +module.exports = { + "env": { + "es6": true, + "node": true + }, + "extends": "eslint:recommended", + "parserOptions": { + "sourceType": "module" + }, + "rules": { + "indent": [ + "error", + "tab" + ], + "linebreak-style": [ + "error", + "unix" + ], + "quotes": [ + "error", + "single" + ], + "semi": [ + "error", + "never" + ] + } +}; \ No newline at end of file diff --git a/package.json b/package.json index 71f93c5..4b82682 100644 --- a/package.json +++ b/package.json @@ -3,11 +3,14 @@ "description": "Tests and implementations for algorithms commonly used in job interviews.", "private": false, "version": "0.0.0", - "devDependencies": { + "dependencies": { "babel-cli": "^6.18.0", "babel-preset-env": "^1.1.4", "babel-register": "^6.18.0", "chai": "~1.8.0", + "eslint": "^3.19.0", + "eslint-config-airbnb-base": "^11.1.3", + "eslint-plugin-import": "^2.2.0", "mocha": "2.0.1" }, "scripts": { diff --git a/test/factorial_test.js b/test/factorial_test.js index bd3f790..6818a3b 100644 --- a/test/factorial_test.js +++ b/test/factorial_test.js @@ -9,5 +9,6 @@ describe.only('factorial()', function(){ it('returns an array of numbers 1-100, fizz for multiples of 3, buzz for multiples of 5, fizzbuzz for multiples of 3 and five', function(){ expect(factorial(5)).to.deep.equal(120) - }) + expect(factorial(10)).to.deep.equal(3628800) + }) })