-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e649676
commit 38a85a9
Showing
10 changed files
with
125 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// karma.conf.js | ||
module.exports = function(config) { | ||
config.set({ | ||
browsers: ['PhantomJS'], | ||
frameworks: ['qunit'], | ||
plugins: [ | ||
'karma-qunit', | ||
'karma-phantomjs-launcher' | ||
], | ||
files: [ | ||
'test/vendor/underscore/underscore.js', | ||
'test/vendor/jquery/dist/jquery.js', | ||
'test/vendor/backbone/backbone.js', | ||
'test/helpers/*.js', | ||
'woodhouse.js', | ||
'test/*.spec.js' | ||
] | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// Function.prototype.bind polyfill for PhantomJS | ||
// https://github.com/cujojs/poly/blob/master/function.js | ||
|
||
(function() { | ||
var isFunction = function(o) { | ||
return typeof o == 'function'; | ||
}; | ||
|
||
|
||
var bind, | ||
slice = [].slice, | ||
proto = Function.prototype, | ||
featureMap; | ||
|
||
featureMap = { | ||
'function-bind': 'bind' | ||
}; | ||
|
||
function has(feature) { | ||
var prop = featureMap[feature]; | ||
return isFunction(proto[prop]); | ||
} | ||
|
||
// check for missing features | ||
if (!has('function-bind')) { | ||
// adapted from Mozilla Developer Network example at | ||
// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function/bind | ||
bind = function bind(obj) { | ||
var args = slice.call(arguments, 1), | ||
self = this, | ||
nop = function() {}, | ||
bound = function() { | ||
return self.apply(this instanceof nop ? this : (obj || {}), args.concat(slice.call(arguments))); | ||
}; | ||
nop.prototype = this.prototype || {}; // Firefox cries sometimes if prototype is undefined | ||
bound.prototype = new nop(); | ||
return bound; | ||
}; | ||
proto.bind = bind; | ||
} | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// Some setup since karma doesn't add #qunit-fixture to its html | ||
(function() { | ||
var fixture = document.createElement('div'); | ||
fixture.id = "qunit-fixture"; | ||
document.body.appendChild(fixture); | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.