Skip to content

Commit

Permalink
Use Jasmine 2.0
Browse files Browse the repository at this point in the history
* Fixes to cater to Jasmine 2.0 API changes.
* Add test suite for describeMixin.

Fix #39
Close #42
  • Loading branch information
Tom Hamshere authored and necolas committed Jul 15, 2014
1 parent d80fe9a commit f653de8
Show file tree
Hide file tree
Showing 9 changed files with 368 additions and 215 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
language: "node_js"
node_js:
- "0.10"
- "0.8"
before_script:
- npm install -g bower
- bower install
Expand Down
4 changes: 2 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
"description": "Extensions to the Jasmine test framework for use with Flight",
"main": "lib/jasmine-flight.js",
"dependencies": {
"jasmine-jquery": "~1.7.0"
"jasmine-jquery": "~2.0.0"
},
"devDependencies": {
"flight": "~1.1.0"
"flight": "~1.2.0"
},
"keywords": [
"flight",
Expand Down
57 changes: 25 additions & 32 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,57 +7,50 @@ module.exports = function (config) {
'use strict';

config.set({
// base path, that will be used to resolve files and exclude

// 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: ['jasmine'],

// list of files / patterns to load in the browser
files: [
// es5 shim for PhantomJS & IE8 & below
'bower_components/es5-shim/es5-shim.js',
'bower_components/es5-shim/es5-sham.js',
'bower_components/jquery/jquery.js',

'bower_components/jasmine-jquery/lib/jasmine-jquery.js',
'lib/jasmine-flight.js',

// hack to load RequireJS after the shim libs
'node_modules/karma-requirejs/lib/require.js',
'node_modules/requirejs/require.js',
'node_modules/karma-requirejs/lib/adapter.js',

// jQuery
'bower_components/jquery/dist/jquery.js',
// jasmine-jquery
'bower_components/jasmine-jquery/lib/jasmine-jquery.js',
// jasmine-flight (what we're actually testing!)
'lib/jasmine-flight.js',
// flight
{pattern: 'bower_components/flight/**/*.js', included: false},
{pattern: 'test/mock/*.js', included: false},
{pattern: 'test/spec/*.js', included: false},

'test/test-main.js'
// specs
{pattern: 'test/spec/**/*.js', included: false},
// mocks
{pattern: 'test/mock/**/*.js', included: false},
// test runner
'test/test-main.js',
],

// use dots reporter, as travis terminal does not support escaping sequences
// possible values: 'dots', 'progress', 'junit', 'teamcity'
// CLI --reporters progress
reporters: ['dots'],

// enable / disable watching file and executing tests whenever any file changes
// CLI --auto-watch --no-auto-watch
autoWatch: true,

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

// Auto run tests on start (when browsers are captured) and exit
// CLI --single-run --no-single-run
singleRun: false,

plugins: [
'karma-jasmine',
'karma-requirejs',
'karma-chrome-launcher',
'karma-firefox-launcher',
'karma-ie-launcher',
'karma-safari-launcher'
]

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

0 comments on commit f653de8

Please sign in to comment.