Skip to content

Commit

Permalink
Also pass app object as parameter to configure callbacks (#698)
Browse files Browse the repository at this point in the history
  • Loading branch information
daffl committed Oct 29, 2017
1 parent 8c5b174 commit 744f6a3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const application = {
},

configure (fn) {
fn.call(this);
fn.call(this, this);

return this;
},
Expand Down
7 changes: 7 additions & 0 deletions test/application.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,13 @@ describe('Feathers application', () => {
});
});

it('additionally passes `app` as .configure parameter (#558)', done => {
feathers().configure(function (app) {
assert.equal(this, app);
done();
});
});

describe('Services', () => {
it('calling .use with a non service object throws', () => {
const app = feathers();
Expand Down

0 comments on commit 744f6a3

Please # to comment.