Skip to content

Commit 9fa197f

Browse files
authored
fix: Shutdown callback is not passed from provider to client (#118)
1 parent 87e7901 commit 9fa197f

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

lib/provider.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ module.exports = function (dependencies) {
4242
);
4343
};
4444

45-
Provider.prototype.shutdown = function shutdown() {
46-
this.client.shutdown();
45+
Provider.prototype.shutdown = function shutdown(callback) {
46+
this.client.shutdown(callback);
4747
};
4848

4949
return Provider;

test/provider.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,10 +174,11 @@ describe('Provider', function () {
174174

175175
describe('shutdown', function () {
176176
it('invokes shutdown on the client', function () {
177+
const callback = sinon.spy();
177178
const provider = new Provider({});
178-
provider.shutdown();
179+
provider.shutdown(callback);
179180

180-
expect(fakes.client.shutdown).to.be.calledOnce;
181+
expect(fakes.client.shutdown).to.be.calledOnceWithExactly(callback);
181182
});
182183
});
183184
});

0 commit comments

Comments
 (0)