Commit ace46aba authored by missingdays's avatar missingdays

Create layout

parent 916a26b1
node_modules/
/*
* Gruntfile.js
* Copyright (C) 2015 missingdays <missingdays@missingdays>
*
* Distributed under terms of the MIT license.
*/
module.exports = function(grunt){
grunt.initConfig({
nodeunit: {
all: ['test/*_test.js']
}
});
grunt.loadNpmTasks('grunt-contrib-nodeunit');
grunt.registerTask('default', ['nodeunit']);
grunt.registerTask('test', ['nodeunit']);
}
{
"name": "my_factorial",
"version": "1.0.0",
"description": "Calculate factorial",
"main": "main.js",
"scripts": {
"test": "grunt test"
},
"repository": {
"type": "git",
"url": "git@gitlab.eterfund.ru:missingdays/factorial.git"
},
"keywords": [
"math",
"factorial"
],
"author": "Evgeny Bovykin",
"license": "ISC",
"devDependencies": {
"grunt": "^0.4.5",
"grunt-contrib-nodeunit": "^0.4.1"
}
}
/*
* main.js
* Copyright (C) 2015 missingdays <missingdays@missingdays>
*
* Distributed under terms of the MIT license.
*/
function factorial() {
return 1;
}
module.exports = factorial;
/*
* main_test.js
* Copyright (C) 2015 missingdays <missingdays@missingdays>
*
* Distributed under terms of the MIT license.
*/
var my_factorial = require('../src/my_factorial');
exports.testCalculatesCorrectly = function(test){
test.equal(1, my_factorial(0));
test.done();
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment