diff --git a/karma.conf.js b/karma.conf.js deleted file mode 100644 index f250efc..0000000 --- a/karma.conf.js +++ /dev/null @@ -1,68 +0,0 @@ -// Karma configuration -// Generated on Sat Mar 08 2014 19:22:15 GMT-0600 (CST) - -module.exports = function(config) { - config.set({ - - // base path, that will be used to resolve files and exclude - basePath: '', - - - // frameworks to use - frameworks: ['jasmine'], - - - // list of files / patterns to load in the browser - files: [ - 'tests/**/*.js' - ], - - - // list of files to exclude - exclude: [ - - ], - - - // test results reporter to use - // possible values: 'dots', 'progress', 'junit', 'growl', 'coverage' - reporters: ['progress'], - - - // web server port - port: 9876, - - - // enable / disable colors in the output (reporters and logs) - colors: true, - - - // level of logging - // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG - logLevel: config.LOG_INFO, - - - // enable / disable watching file and executing tests whenever any file changes - autoWatch: true, - - - // Start these browsers, currently available: - // - Chrome - // - ChromeCanary - // - Firefox - // - Opera (has to be installed with `npm install karma-opera-launcher`) - // - Safari (only Mac; has to be installed with `npm install karma-safari-launcher`) - // - PhantomJS - // - IE (only Windows; has to be installed with `npm install karma-ie-launcher`) - browsers: ['Chrome'], - - - // If browser does not capture in given timeout [ms], kill it - captureTimeout: 60000, - - - // Continuous Integration mode - // if true, it capture browsers, run tests and exit - singleRun: false - }); -}; diff --git a/package.json b/package.json index 83379d4..a624cfb 100644 --- a/package.json +++ b/package.json @@ -1,38 +1,49 @@ { - "name": "lunch", - "private": true, - "version": "0.0.0", - "description": "a Sails application", - "dependencies": { - "sails": "0.9.9", - "grunt": "0.4.1", - "sails-disk": "~0.9.0", - "optimist": "0.3.4", - "then-jade": "1.1.0", - "sails-mongo": "latest", - "mongodb": "latest" - }, - "scripts": { - "start": "node app.js", - "debug": "node debug app.js" - }, - "main": "app.js", - "repository": "", - "author": "", - "license": "", - "devDependencies": { - "load-grunt-tasks": "~0.3.0", - "glob": "3.2.8", - "grunt-contrib-clean": "~0.5.0", - "grunt-contrib-copy": "~0.5.0", - "grunt-contrib-concat": "~0.3.0", - "grunt-contrib-jst": "~0.5.1", - "grunt-contrib-watch": "~0.5.3", - "grunt-contrib-uglify": "~0.3.2", - "grunt-contrib-cssmin": "~0.8.0", - "grunt-contrib-less": "~0.9.0", - "grunt-contrib-coffee": "~0.10.1", - "grunt-sails-linker": "~0.9.5", - "grunt-contrib-jade": "~0.10.0" - } + "name": "lunch", + "private": true, + "version": "0.0.0", + "description": "a Sails application", + "dependencies": { + "sails": "0.9.9", + "grunt": "0.4.1", + "sails-disk": "~0.9.0", + "optimist": "0.3.4", + "then-jade": "1.1.0", + "sails-mongo": "latest", + "mongodb": "latest" + }, + "scripts": { + "start": "node app.js", + "debug": "node debug app.js" + }, + "main": "app.js", + "repository": "", + "author": "", + "license": "", + "devDependencies": { + "load-grunt-tasks": "~0.3.0", + "glob": "3.2.8", + "grunt-contrib-clean": "~0.5.0", + "grunt-contrib-copy": "~0.5.0", + "grunt-contrib-concat": "~0.3.0", + "grunt-contrib-jst": "~0.5.1", + "grunt-contrib-watch": "~0.5.3", + "grunt-contrib-uglify": "~0.3.2", + "grunt-contrib-cssmin": "~0.8.0", + "grunt-contrib-less": "~0.9.0", + "grunt-contrib-coffee": "~0.10.1", + "grunt-sails-linker": "~0.9.5", + "grunt-contrib-jade": "~0.10.0", + "karma-script-launcher": "~0.1.0", + "karma-chrome-launcher": "~0.1.2", + "karma-firefox-launcher": "~0.1.3", + "karma-html2js-preprocessor": "~0.1.0", + "karma-jasmine": "~0.1.5", + "karma-coffee-preprocessor": "~0.1.3", + "requirejs": "~2.1.11", + "karma-requirejs": "~0.2.1", + "karma-phantomjs-launcher": "~0.1.2", + "karma": "~0.10.9", + "grunt-karma": "~0.6.2" + } } diff --git a/tasks/options/karma.js b/tasks/options/karma.js new file mode 100644 index 0000000..f191fac --- /dev/null +++ b/tasks/options/karma.js @@ -0,0 +1,73 @@ +// Karma configuration +// Generated on Sat Mar 08 2014 19:22:15 GMT-0600 (CST) + +module.exports = function(config) { + return { + unit: { + options: { + // base path, that will be used to resolve files and exclude + basePath: '', + + + // frameworks to use + frameworks: ['jasmine'], + + + // list of files / patterns to load in the browser + files: [ + 'assets/linker/js/vendor/angular.js', + 'assets/linker/js/controllers/*.js', + 'tests/**/*.js' + ], + + + // list of files to exclude + exclude: [ + + ], + + + // test results reporter to use + // possible values: 'dots', 'progress', 'junit', 'growl', 'coverage' + reporters: ['progress'], + + + // web server port + port: 9876, + + + // enable / disable colors in the output (reporters and logs) + colors: true, + + + // level of logging + // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG + logLevel: config.LOG_INFO, + + + // enable / disable watching file and executing tests whenever any file changes + autoWatch: true, + + + // Start these browsers, currently available: + // - Chrome + // - ChromeCanary + // - Firefox + // - Opera (has to be installed with `npm install karma-opera-launcher`) + // - Safari (only Mac; has to be installed with `npm install karma-safari-launcher`) + // - PhantomJS + // - IE (only Windows; has to be installed with `npm install karma-ie-launcher`) + browsers: ['Chrome'], + + + // If browser does not capture in given timeout [ms], kill it + captureTimeout: 60000, + + + // Continuous Integration mode + // if true, it capture browsers, run tests and exit + singleRun: false + } + } + }; +}; diff --git a/tests/unit/fake.js b/tests/unit/fake.js new file mode 100644 index 0000000..7faecff --- /dev/null +++ b/tests/unit/fake.js @@ -0,0 +1,6 @@ +describe("test test", function() { + it('should be false', function() { + var bob = 1; + expect(bob).toBe(1); + }); +});