Skip to content

Commit

Permalink
Merge pull request #361 from marmelab/fix_tests
Browse files Browse the repository at this point in the history
[RFR] Fix Karma tests
  • Loading branch information
ThieryMichel committed Mar 27, 2015
2 parents 76ee25e + af4d303 commit 54cefb5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/javascripts/ng-admin/es6/lib/View/ListView.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class ListView extends View {
this._sortDir = 'DESC';
}

perPage(perPage) {
perPage() {
if (!arguments.length) return this._perPage;
this._perPage = arguments[0];
return this;
Expand Down
7 changes: 7 additions & 0 deletions src/javascripts/test/function.bind.shim.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// PhantomJS doesn't support bind yet
Function.prototype.bind = Function.prototype.bind || function (thisp) {
var fn = this;
return function () {
return fn.apply(thisp, arguments);
};
};
1 change: 1 addition & 0 deletions src/javascripts/test/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ module.exports = function (config) {
{pattern: 'ng-admin/lib/polyfill/bind.js', included: true},

// Test files
{pattern: 'test/function.bind.shim.js', included: true},
{pattern: 'test/mock/*.js', included: false},
{pattern: 'test/unit/**/**/*.js', included: false},

Expand Down

0 comments on commit 54cefb5

Please sign in to comment.