Skip to content
This repository was archived by the owner on Nov 25, 2020. It is now read-only.

Fix test #83

Merged
merged 3 commits into from
Sep 20, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions gulpfile.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ gulp.task 'libs', ->
gulp.task 'export', ->

return if argv.entryPath

exec "cd ./src;sh exporter.sh > entry.coffee; cd .."


Expand Down Expand Up @@ -227,13 +227,21 @@ testFiles = [
gulp.task 'karma', ['coffee-test'], ->

karma = require 'gulp-karma'

gulp.src testFiles
.pipe karma
configFile : 'karma.conf.js'
action : karmaAction


gulp.task 'karma-travis', ['coffee-test'], ->
karma = require 'gulp-karma'
gulp.src testFiles
.pipe karma
configFile : 'karma.travis.conf.js'
action : 'run'


gulp.task 'sauce', ->
gulp.src testFiles
.pipe karma
Expand Down Expand Up @@ -332,7 +340,7 @@ gulp.task 'clean-play', ->
gulp.task 'markdox', ->

markdox = require 'gulp-markdox'

gulp.src [
'src/**/core/**/*.coffee'
'src/**/components/**/*.coffee'
Expand Down
55 changes: 55 additions & 0 deletions karma.travis.conf.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
// Karma configuration
// Generated on Wed Mar 19 2014 12:00:53 GMT-0700 (PDT)

module.exports = function(config) {
config.set({

// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '',


// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
frameworks: ['mocha'],


// list of files / patterns to load in the browser
files: [
'test/kd.libs.js',
'test/kd.test.js'
],

// test results reporter to use
// possible values: 'dots', 'progress'
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
reporters: ['dots'],


// 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: false,


// start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
browsers: ['Firefox'],


// Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits
singleRun: true
});
};

16 changes: 11 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"description": "KD: a non-document focused UI Framework for web applications.",
"main": "gulpfile.js",
"scripts": {
"test": "./node_modules/karma/bin/karma start --browsers Firefox --single-run"
"test": "./node_modules/gulp/bin/gulp.js karma-travis"
},
"homepage": "http://kd.io",
"homepage": "http://kd.io",
"repository": {
"type": "git",
"url": "git://github.com/koding/kd.git"
Expand Down Expand Up @@ -41,10 +41,16 @@
"bluebird": "^2.3.2"
},
"devDependencies": {
"gulp-livereload": "^2.1.1",
"chai": "^1.9.1",
"express": "^4.9.0",
"gulp-karma": "0.0.4",
"gulp-livereload": "^2.1.1",
"gulp-markdox": "^0.1.0",
"karma-chrome-launcher": "^0.1.4",
"karma-firefox-launcher": "^0.1.3",
"karma-mocha": "^0.1.9",
"karma-sauce-launcher": "^0.2.10",
"express": "^4.9.0",
"gulp-markdox": "^0.1.0"
"mocha": "^1.21.4",
"sinon": "^1.10.3"
}
}