Skip to content

Commit 905d9f6

Browse files
committed
Also pass app object as parameter to configure callbacks (#698)
1 parent 5a3df68 commit 905d9f6

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

lib/application.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ const application = {
5656
},
5757

5858
configure (fn) {
59-
fn.call(this);
59+
fn.call(this, this);
6060

6161
return this;
6262
},

test/application.test.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,13 @@ describe('Feathers application', () => {
6565
});
6666
});
6767

68+
it('additionally passes `app` as .configure parameter (#558)', done => {
69+
feathers().configure(function (app) {
70+
assert.equal(this, app);
71+
done();
72+
});
73+
});
74+
6875
describe('Services', () => {
6976
it('calling .use with a non service object throws', () => {
7077
const app = feathers();

0 commit comments

Comments
 (0)