diff --git a/test/worker/api.js b/test/worker/api.js index 18881393..c63a2760 100644 --- a/test/worker/api.js +++ b/test/worker/api.js @@ -564,8 +564,8 @@ describe('Random Buffer', function() { }); it('Throw error if not initialized', function () { - expect(randomBuffer.set).to.throw('RandomBuffer is not initialized'); - expect(randomBuffer.get).to.throw('RandomBuffer is not initialized'); + expect(randomBuffer.set.bind(randomBuffer)).to.throw('RandomBuffer is not initialized'); + expect(randomBuffer.get.bind(randomBuffer)).to.throw('RandomBuffer is not initialized'); }); it('Initialization', function () {