From b5dbcf037c24df48f6f499cc59e68396e69d954a Mon Sep 17 00:00:00 2001 From: Carlyse Jordan Date: Thu, 16 Mar 2017 20:43:37 -0400 Subject: [PATCH 01/15] passed my first test! --- src/specs/thoughter.specs.js | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/specs/thoughter.specs.js diff --git a/src/specs/thoughter.specs.js b/src/specs/thoughter.specs.js new file mode 100644 index 0000000..9afcb75 --- /dev/null +++ b/src/specs/thoughter.specs.js @@ -0,0 +1,29 @@ +(function() { + 'use strict'; + let expect = chai.expect; + + describe('test run', function(){ + it('should be true', function(){ + expect(true).to.be.true; + }); + describe('recent module', function(){ + describe('show recent function', function(){ + beforeEach(function(){ + // I need to add an element with a class of recent + let recentTag = document.createElement('main'); + recentTag.className = 'recent'; + document.querySelector('body').appendChild(recentTag); + }); + + it('should be a function', function(){ + expect(window.thoughter.showRecent).to.be.a('function'); + + }); + + + }); + + + }); + }); +}()); From ef4ca951934076da1dbdbc4ac35646abd10ef0d6 Mon Sep 17 00:00:00 2001 From: Carlyse Jordan Date: Thu, 16 Mar 2017 20:45:38 -0400 Subject: [PATCH 02/15] i detailed what the lines should do for personal reference --- src/js/recent-thoughts.js | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/js/recent-thoughts.js b/src/js/recent-thoughts.js index c548e79..dab88ad 100644 --- a/src/js/recent-thoughts.js +++ b/src/js/recent-thoughts.js @@ -10,25 +10,36 @@ * @return {void} */ window.thoughter.showRecent = function showRecent(thoughts = []) { + // this is creating a function (showRecent)which takes an arg (thought = []) if (!Array.isArray(thoughts)) { + //if (thoughts) is not an array return nothing, return; } - recent = document.querySelector('.recent'); - thoughts.forEach(function showThought(thought) { + let recent = document.querySelector('.recent'); + //selecting an element with the class name of recent and defining recent + thoughts.forEach(function showThought(thoughts) { + //for each object in the array called thoughts if (!thought.content || !thought.createTime || !thought.id) { + //if the thought has no content or createTime or an id we don't want it, so we return return; } let thoughtUI = document.createElement('article'); + //creating an element (article) while setting it to a variable thoughtUI.classList.add('panel'); + //adding the class panel to the article 'thoughtUI' thoughtUI.classList.add('panel-info'); + //adding class panel-info to the article 'thoughtUI' thoughtUI.setAttribute('id', 'thought-' + thought.id); + //setting an id to thoughtUI thoughtUI.innerHTML = `
Posted ${thoughts.createTime}

${thought.content}

`; + //adding HTML to the article recent.appendChild(thoughtUI); + //adding the recent class to the article thoughtUI }); }; From d3a73c892b6f1b8f7240d28cc749be60c37399d0 Mon Sep 17 00:00:00 2001 From: Carlyse Jordan Date: Thu, 16 Mar 2017 22:36:45 -0400 Subject: [PATCH 03/15] ading root files --- package.json | 36 ++++++++++++++++++++++++++++++++++++ thoughter.conf.js | 16 ++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 package.json create mode 100644 thoughter.conf.js diff --git a/package.json b/package.json new file mode 100644 index 0000000..f5cc64b --- /dev/null +++ b/package.json @@ -0,0 +1,36 @@ +{ + "name": "wk5-day3", + "version": "1.0.0", + "description": "this is code for homework", + "main": "src/js/recent-thoughts.js", + "dependencies": { + "chai": "^3.5.0", + "karma": "^1.5.0", + "karma-chrome-launcher": "^2.0.0", + "karma-chai": "^0.1.0", + "karma-mocha": "^1.3.0", + "sinon": "^2.0.0" + }, + "devDependencies": { + "chai": "^3.5.0", + "karma": "^1.5.0", + "karma-chai": "^0.1.0", + "karma-chrome-launcher": "^2.0.0", + "karma-mocha": "^1.3.0", + "mocha": "^3.2.0", + "sinon": "^2.0.0" + }, + "scripts": { + "test": "karma start thoughter.conf.js" + }, + "author": "Carlyse Jordan", + "license": "ISC", + "repository": { + "type": "git", + "url": "git+https://github.com/Carlysej89/thoughter.git" + }, + "bugs": { + "url": "https://github.com/Carlysej89/thoughter/issues" + }, + "homepage": "https://github.com/Carlysej89/thoughter#readme" +} diff --git a/thoughter.conf.js b/thoughter.conf.js new file mode 100644 index 0000000..2a3a859 --- /dev/null +++ b/thoughter.conf.js @@ -0,0 +1,16 @@ +module.exports = function karmaConfig( config ){ + config.set({ + // Karma will inject the mocha and chai JS files into its test runner HTMl + + frameworks: ['mocha', 'chai'], + browsers: ['Chrome'], + singleRun: true, + files: [ + 'src/**/*.js', + //globbing pattern - look an the src/ directory and ANY subdirectory + //for ANY file that ends in .js + 'node_modules/sinon/pkg/sinon-2.0.0.js', + 'tests/specs/**/*.js' + ] + }); +}; From 96f2d2d41e92c744d8ced37786c7539128e9e141 Mon Sep 17 00:00:00 2001 From: Carlyse Jordan Date: Thu, 16 Mar 2017 23:09:55 -0400 Subject: [PATCH 04/15] added the afterEach portion of the test --- src/specs/thoughter.specs.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/specs/thoughter.specs.js b/src/specs/thoughter.specs.js index 9afcb75..0aff918 100644 --- a/src/specs/thoughter.specs.js +++ b/src/specs/thoughter.specs.js @@ -15,15 +15,20 @@ document.querySelector('body').appendChild(recentTag); }); - it('should be a function', function(){ - expect(window.thoughter.showRecent).to.be.a('function'); + afterEach(function(){ - }); + let recentTag = document.querySelector('main'); + recentTag.className = 'recent'; + recentTag.parentNode.removeChild(recentTag); + }); + it('should be a function', function(){ + expect(window.thoughter.showRecent).to.be.a('function'); }); }); }); +}); }()); From 8007fce406b160f7745927467a3787a93227438f Mon Sep 17 00:00:00 2001 From: Carlyse Jordan Date: Thu, 16 Mar 2017 23:27:22 -0400 Subject: [PATCH 05/15] while only two of my tests passed one has failed --- src/specs/thoughter.specs.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/specs/thoughter.specs.js b/src/specs/thoughter.specs.js index 0aff918..a403391 100644 --- a/src/specs/thoughter.specs.js +++ b/src/specs/thoughter.specs.js @@ -26,9 +26,19 @@ expect(window.thoughter.showRecent).to.be.a('function'); }); - + it('should check for all the properties in each array', function(){ + window.thoughter.showRecent([ + { + content: '', + createTime: '', + id: ' ' + } + ]); + let recent = document.querySelectorAll('main.recent article'); + expect(recent.length).to.equal(1); + }); + }); }); }); -}); }()); From 971d898a07e0932a22b2a135bf6057c9c9f6e751 Mon Sep 17 00:00:00 2001 From: Carlyse Jordan Date: Thu, 16 Mar 2017 23:28:28 -0400 Subject: [PATCH 06/15] commented out the getRecent function --- src/js/recent-thoughts.js | 46 +++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/src/js/recent-thoughts.js b/src/js/recent-thoughts.js index dab88ad..4a446ef 100644 --- a/src/js/recent-thoughts.js +++ b/src/js/recent-thoughts.js @@ -43,28 +43,28 @@ }); }; - /** - * Retrieves the most recent thoughts, using the provided count as the limit - * - * @param {Number} count How many thoughts to limit to, must be a positive number (defaults to 10) - * @return {Promise} The resolved promise will have the data array as the argument - */ - window.thoughter.getRecent = function getRecent(count = 10) { - if (typeof(count) !== 'number' || count < 1) { - return Promise.reject('Sorry, but the count must be a positive number'); - } - - return fetch( - 'http://thoughter.herokuapp.com/api/Thoughts?filter={"order":"createTime DESC","limit":' + count + '}' - ) - .then(function handleResponse(res) { - if (res.status > 299) { - console.error('Looks like a bad status code:', res.status); - return Promise.reject('Sorry, but there was a problem with your request.'); - } else { - return res.json(); - } - }); - }; + // /** + // * Retrieves the most recent thoughts, using the provided count as the limit + // * + // * @param {Number} count How many thoughts to limit to, must be a positive number (defaults to 10) + // * @return {Promise} The resolved promise will have the data array as the argument + // */ + // window.thoughter.getRecent = function getRecent(count = 10) { + // if (typeof(count) !== 'number' || count < 1) { + // return Promise.reject('Sorry, but the count must be a positive number'); + // } + // + // return fetch( + // 'http://thoughter.herokuapp.com/api/Thoughts?filter={"order":"createTime DESC","limit":' + count + '}' + // ) + // .then(function handleResponse(res) { + // if (res.status > 299) { + // console.error('Looks like a bad status code:', res.status); + // return Promise.reject('Sorry, but there was a problem with your request.'); + // } else { + // return res.json(); + // } + // }); + // }; })(); From 3e55d4a8502715a8dedfd43495b3273245c23cba Mon Sep 17 00:00:00 2001 From: Carlyse Jordan Date: Thu, 16 Mar 2017 23:34:19 -0400 Subject: [PATCH 07/15] added more definition to my README --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 4171bc5..7207e89 100644 --- a/README.md +++ b/README.md @@ -2,3 +2,11 @@ # Thoughter Definitely not a Twitter clone. + +Edited by: Carlyse Jordan +TIY +03/16/17 + +This was a homework exercise used to get more practice with asynchronous DOM +and ajax testing using tools such as mocha(describe/module library), chai(assertion +framework) and karma as the test runner. From 14a52e18e928feed053933b306dad4a2bdfaa2b4 Mon Sep 17 00:00:00 2001 From: Carlyse Jordan Date: Fri, 17 Mar 2017 15:28:26 -0400 Subject: [PATCH 08/15] completed copy clean and build tasks --- gruntfile.js | 24 ++++++++++++++++++++++++ package.json | 4 ++++ 2 files changed, 28 insertions(+) create mode 100644 gruntfile.js diff --git a/gruntfile.js b/gruntfile.js new file mode 100644 index 0000000..64cabf2 --- /dev/null +++ b/gruntfile.js @@ -0,0 +1,24 @@ +module.exports = function configureGrunt(gruntConfig){ + + gruntConfig.initConfig({ + clean: ['build/'], + + copy: { + htmlcopy: { + + files: [ { + src: 'src/*.html', + dest: 'build/', + expand: true + } + ] + } + } + + }); + require('load-grunt-tasks')(gruntConfig); + + //create a task called "alias" to run multiple OTHER tasks + //can create more aliases! + gruntConfig.registerTask('build',['clean','copy']); +}; diff --git a/package.json b/package.json index f5cc64b..607e114 100644 --- a/package.json +++ b/package.json @@ -13,10 +13,14 @@ }, "devDependencies": { "chai": "^3.5.0", + "grunt": "^1.0.1", + "grunt-contrib-clean": "^1.0.0", + "grunt-contrib-copy": "^1.0.0", "karma": "^1.5.0", "karma-chai": "^0.1.0", "karma-chrome-launcher": "^2.0.0", "karma-mocha": "^1.3.0", + "load-grunt-tasks": "^3.5.2", "mocha": "^3.2.0", "sinon": "^2.0.0" }, From c6b9382abf5d858dee8b4e9d07010eaca5e67c42 Mon Sep 17 00:00:00 2001 From: Carlyse Jordan Date: Fri, 17 Mar 2017 15:29:08 -0400 Subject: [PATCH 09/15] src file --- src/recent-thoughts.js | 70 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 src/recent-thoughts.js diff --git a/src/recent-thoughts.js b/src/recent-thoughts.js new file mode 100644 index 0000000..4a446ef --- /dev/null +++ b/src/recent-thoughts.js @@ -0,0 +1,70 @@ +(function() { + 'use strict'; + + window.thoughter = window.thoughter || {}; + + /** + * Shows the provided thought data on the page in the `.recent` element + * + * @param {Array} thoughts The array of thought objects to display + * @return {void} + */ + window.thoughter.showRecent = function showRecent(thoughts = []) { + // this is creating a function (showRecent)which takes an arg (thought = []) + if (!Array.isArray(thoughts)) { + //if (thoughts) is not an array return nothing, + return; + } + + let recent = document.querySelector('.recent'); + //selecting an element with the class name of recent and defining recent + thoughts.forEach(function showThought(thoughts) { + //for each object in the array called thoughts + if (!thought.content || !thought.createTime || !thought.id) { + //if the thought has no content or createTime or an id we don't want it, so we return + return; + } + + let thoughtUI = document.createElement('article'); + //creating an element (article) while setting it to a variable + thoughtUI.classList.add('panel'); + //adding the class panel to the article 'thoughtUI' + thoughtUI.classList.add('panel-info'); + //adding class panel-info to the article 'thoughtUI' + thoughtUI.setAttribute('id', 'thought-' + thought.id); + //setting an id to thoughtUI + thoughtUI.innerHTML = `
Posted ${thoughts.createTime}
+
+

${thought.content}

+
`; + //adding HTML to the article + recent.appendChild(thoughtUI); + //adding the recent class to the article thoughtUI + }); + }; + + // /** + // * Retrieves the most recent thoughts, using the provided count as the limit + // * + // * @param {Number} count How many thoughts to limit to, must be a positive number (defaults to 10) + // * @return {Promise} The resolved promise will have the data array as the argument + // */ + // window.thoughter.getRecent = function getRecent(count = 10) { + // if (typeof(count) !== 'number' || count < 1) { + // return Promise.reject('Sorry, but the count must be a positive number'); + // } + // + // return fetch( + // 'http://thoughter.herokuapp.com/api/Thoughts?filter={"order":"createTime DESC","limit":' + count + '}' + // ) + // .then(function handleResponse(res) { + // if (res.status > 299) { + // console.error('Looks like a bad status code:', res.status); + // return Promise.reject('Sorry, but there was a problem with your request.'); + // } else { + // return res.json(); + // } + // }); + // }; + +})(); From 3d2d09073166c33923e5328964981609fc821e9d Mon Sep 17 00:00:00 2001 From: Carlyse Jordan Date: Fri, 17 Mar 2017 16:09:00 -0400 Subject: [PATCH 10/15] compiled sass file --- src/sass/main.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sass/main.scss b/src/sass/main.scss index affe303..c915712 100644 --- a/src/sass/main.scss +++ b/src/sass/main.scss @@ -2,5 +2,5 @@ @import 'variables'; @import 'header'; @import 'login'; -@import 'new-thought'; +//@import 'new-thought'; @import 'recent'; From 84430f3a989f7b5ba53010899dfede937ddd3176 Mon Sep 17 00:00:00 2001 From: Carlyse Jordan Date: Fri, 17 Mar 2017 16:12:41 -0400 Subject: [PATCH 11/15] added sass and updated grunt file --- gruntfile.js | 9 ++++++++- package.json | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/gruntfile.js b/gruntfile.js index 64cabf2..4a396fd 100644 --- a/gruntfile.js +++ b/gruntfile.js @@ -13,6 +13,13 @@ module.exports = function configureGrunt(gruntConfig){ } ] } + }, + sass: { + all: { + files: { + 'build/style.csss':'src/sass/main.scss' + } + } } }); @@ -20,5 +27,5 @@ module.exports = function configureGrunt(gruntConfig){ //create a task called "alias" to run multiple OTHER tasks //can create more aliases! - gruntConfig.registerTask('build',['clean','copy']); + gruntConfig.registerTask('build',['clean','copy','sass']); }; diff --git a/package.json b/package.json index 607e114..28ca4a0 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,7 @@ "grunt": "^1.0.1", "grunt-contrib-clean": "^1.0.0", "grunt-contrib-copy": "^1.0.0", + "grunt-contrib-sass": "^1.0.0", "karma": "^1.5.0", "karma-chai": "^0.1.0", "karma-chrome-launcher": "^2.0.0", From 21b2c6a7807854d3aa9127650af86ad2fd3960ab Mon Sep 17 00:00:00 2001 From: Carlyse Jordan Date: Mon, 20 Mar 2017 08:54:04 -0400 Subject: [PATCH 12/15] adding updated package.json file and gruntfile.js --- gruntfile.js | 12 +++++++++++- package.json | 2 ++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/gruntfile.js b/gruntfile.js index 4a396fd..e434234 100644 --- a/gruntfile.js +++ b/gruntfile.js @@ -20,6 +20,16 @@ module.exports = function configureGrunt(gruntConfig){ 'build/style.csss':'src/sass/main.scss' } } + }, + jshint: { + appjs: { + options: { + jshintrc: '.jshintrc' + }, + files: { + src: ['src/**/*.js'] + } + } } }); @@ -27,5 +37,5 @@ module.exports = function configureGrunt(gruntConfig){ //create a task called "alias" to run multiple OTHER tasks //can create more aliases! - gruntConfig.registerTask('build',['clean','copy','sass']); + gruntConfig.registerTask('build',['jshint','clean','copy','sass']); }; diff --git a/package.json b/package.json index 28ca4a0..1074b41 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,9 @@ "grunt": "^1.0.1", "grunt-contrib-clean": "^1.0.0", "grunt-contrib-copy": "^1.0.0", + "grunt-contrib-jshint": "^1.1.0", "grunt-contrib-sass": "^1.0.0", + "jquery": "^3.2.0", "karma": "^1.5.0", "karma-chai": "^0.1.0", "karma-chrome-launcher": "^2.0.0", From 844fb663358fca18f4eb0a8d3756c188047a1081 Mon Sep 17 00:00:00 2001 From: Carlyse Jordan Date: Mon, 20 Mar 2017 08:57:57 -0400 Subject: [PATCH 13/15] gruntfile update --- gruntfile.js | 44 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 42 insertions(+), 2 deletions(-) diff --git a/gruntfile.js b/gruntfile.js index e434234..5f0d2b5 100644 --- a/gruntfile.js +++ b/gruntfile.js @@ -14,6 +14,29 @@ module.exports = function configureGrunt(gruntConfig){ ] } }, + copythejquery: { + files: [ + { + cwd: 'node_modules/jquery/dist', + src: ['jquery.js'], + dest: 'build/js/vendor/', + expand: true + } + ] + + }, + + copythejs:{ + files: [ + { + cwd: 'src/js', + src: ['*.js'], + dest: 'build/js/', + expand: true + } + ] + }, + sass: { all: { files: { @@ -21,7 +44,7 @@ module.exports = function configureGrunt(gruntConfig){ } } }, - jshint: { + jshint: { appjs: { options: { jshintrc: '.jshintrc' @@ -30,6 +53,23 @@ module.exports = function configureGrunt(gruntConfig){ src: ['src/**/*.js'] } } + }, + karma: { + all: { + + options:{ + //if Im using grunt to run karma (tests), then we DON'T need a app.conf.js + //file for karma separatelly + //Same options from Conf.js file + frameworks: ['mocha', 'chai'], + browsers: ['Chrome'], + singleRun: true, + files: [ + 'src/**/*.js', + 'tests/specs/**/*.js' + ] + } + } } }); @@ -37,5 +77,5 @@ module.exports = function configureGrunt(gruntConfig){ //create a task called "alias" to run multiple OTHER tasks //can create more aliases! - gruntConfig.registerTask('build',['jshint','clean','copy','sass']); + gruntConfig.registerTask('build',['jshint','karma','clean','copy','sass']); }; From 594fd83ee1c0b287bb31c90d13e205a4b7827be0 Mon Sep 17 00:00:00 2001 From: Carlyse Jordan Date: Mon, 20 Mar 2017 09:42:57 -0400 Subject: [PATCH 14/15] gruntfile package.json danges --- gruntfile.js | 6 +++--- package.json | 8 -------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/gruntfile.js b/gruntfile.js index 5f0d2b5..b9c94b1 100644 --- a/gruntfile.js +++ b/gruntfile.js @@ -29,9 +29,9 @@ module.exports = function configureGrunt(gruntConfig){ copythejs:{ files: [ { - cwd: 'src/js', - src: ['*.js'], - dest: 'build/js/', + cwd: 'src/', + src: ['**/*.js'], + dest: 'build/', expand: true } ] diff --git a/package.json b/package.json index 1074b41..6f7a6bb 100644 --- a/package.json +++ b/package.json @@ -6,10 +6,6 @@ "dependencies": { "chai": "^3.5.0", "karma": "^1.5.0", - "karma-chrome-launcher": "^2.0.0", - "karma-chai": "^0.1.0", - "karma-mocha": "^1.3.0", - "sinon": "^2.0.0" }, "devDependencies": { "chai": "^3.5.0", @@ -20,12 +16,8 @@ "grunt-contrib-sass": "^1.0.0", "jquery": "^3.2.0", "karma": "^1.5.0", - "karma-chai": "^0.1.0", - "karma-chrome-launcher": "^2.0.0", - "karma-mocha": "^1.3.0", "load-grunt-tasks": "^3.5.2", "mocha": "^3.2.0", - "sinon": "^2.0.0" }, "scripts": { "test": "karma start thoughter.conf.js" From c2925e61ff6767643416fb4c8e4300f0494a2ec6 Mon Sep 17 00:00:00 2001 From: Carlyse Jordan Date: Mon, 20 Mar 2017 22:00:54 -0400 Subject: [PATCH 15/15] commiting updated grunt --- gruntfile.js | 113 +++++++++++++++++++++++++-------------------------- 1 file changed, 56 insertions(+), 57 deletions(-) diff --git a/gruntfile.js b/gruntfile.js index b9c94b1..ec9ee63 100644 --- a/gruntfile.js +++ b/gruntfile.js @@ -10,72 +10,71 @@ module.exports = function configureGrunt(gruntConfig){ src: 'src/*.html', dest: 'build/', expand: true - } - ] + } + ] + } + }, + copythejquery: { + files: [ + { + src: ['jquery.js'], + dest: 'build/js/vendor/', + expand: true } - }, - copythejquery: { - files: [ - { - cwd: 'node_modules/jquery/dist', - src: ['jquery.js'], - dest: 'build/js/vendor/', - expand: true - } - ] + ] - }, + }, - copythejs:{ - files: [ - { - cwd: 'src/', - src: ['**/*.js'], - dest: 'build/', - expand: true - } - ] - }, + copythejs:{ + files: [ + { + cwd: 'src/', + src: ['**/*.js'], + dest: 'build/', + expand: true + } + ] + }, - sass: { - all: { - files: { - 'build/style.csss':'src/sass/main.scss' - } + sass: { + all: { + files: { + 'build/style.csss':'src/sass/main.scss' } - }, - jshint: { - appjs: { - options: { - jshintrc: '.jshintrc' - }, - files: { - src: ['src/**/*.js'] - } + } + }, + jshint: { + appjs: { + options: { + jshintrc: '.jshintrc' + }, + files: { + src: ['src/**/*.js'] } - }, - karma: { - all: { + } + }, + karma: { + all: { - options:{ - //if Im using grunt to run karma (tests), then we DON'T need a app.conf.js - //file for karma separatelly - //Same options from Conf.js file - frameworks: ['mocha', 'chai'], - browsers: ['Chrome'], - singleRun: true, - files: [ - 'src/**/*.js', - 'tests/specs/**/*.js' - ] - } + options:{ + //if Im using grunt to run karma (tests), then we DON'T need a app.conf.js + //file for karma separatelly + //Same options from Conf.js file + frameworks: ['mocha', 'chai'], + browsers: ['Chrome'], + singleRun: true, + files: [ + 'src/**/*.js', + 'tests/specs/**/*.js' + ] } } + } - }); - require('load-grunt-tasks')(gruntConfig); +}); +require('load-grunt-tasks')(gruntConfig); - //create a task called "alias" to run multiple OTHER tasks - //can create more aliases! - gruntConfig.registerTask('build',['jshint','karma','clean','copy','sass']); +//create a task called "alias" to run multiple OTHER tasks +//can create more aliases! +gruntConfig.registerTask('build',['jshint','karma','clean','copy','sass']); };