8000 Also pass app object as parameter to configure callbacks by daffl · Pull Request #698 · feathersjs/feathers · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
89BF 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