diff --git a/lib/add-two.js b/lib/add-two.js new file mode 100644 index 0000000..b7bb85d --- /dev/null +++ b/lib/add-two.js @@ -0,0 +1,9 @@ +function addTwo(n) { + return n + 2; +}; + +addTwo.prototype.whatever = function() { + // something +}; + +module.exports = addTwo; diff --git a/lib/index.js b/lib/index.js index 8b13789..aa74bd8 100644 --- a/lib/index.js +++ b/lib/index.js @@ -1 +1,19 @@ +var addTwo = require('./add-two'); + +addTwo(5); + +// Project Folder - https://github.com/turingschool/ruby-submissions/tree/master/1508/module_4_assignments/gametime +// Checkin 1 - https://github.com/turingschool/ruby-submissions/blob/master/1508/module_4_assignments/gametime/template/check_in1.markdown + +// Resources: +// https://babeljs.io/docs/learn-es2015/#iterators-for-of +// https://webpack.github.io/docs/tutorials/getting-started/ + +// Commands: +// npm test / start / run add-two / run build + +// Advice: +// Start small with components, keep business logic off canvas +// UI -- (canvas, events, bootstrapping) is really hard to test +// Business Logic -- "the Universe", entity of game (blocks, pieces, etc.) diff --git a/package.json b/package.json index 5fc0e2d..dc21026 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { - "name": "game-time-starter-kit", + "name": "tetris", "version": "1.0.0", - "description": "A starter kit for Turing School's Game Time project.", + "description": "Tetris, the game.", "main": "index.js", "scripts": { "start": "./node_modules/webpack-dev-server/bin/webpack-dev-server.js", diff --git a/test/add-two-test.js b/test/add-two-test.js new file mode 100644 index 0000000..5096fb2 --- /dev/null +++ b/test/add-two-test.js @@ -0,0 +1,9 @@ +var assert = require('chai').assert; +var addTwo = require('../lib/add-two'); + + +describe('addTwo', function(){ + it('should add two to a number', function(){ + assert.strictEqual(4, addTwo(2)); + }) +}) diff --git a/test/index.js b/test/index.js index e69de29..7fa8353 100644 --- a/test/index.js +++ b/test/index.js @@ -0,0 +1 @@ +require('./add-two-test');