it('should be emitted when the context is disposed', (done) => { context.disposed.connect((sender, args) => { expect(sender).to.be(context); expect(args).to.be(void 0); done(); }); context.dispose(); });
it('should be emitted when the context is disposed', () => { let called = false; context.disposed.connect((sender, args) => { expect(sender).to.equal(context); expect(args).to.be.undefined; called = true; }); context.dispose(); expect(called).to.equal(true); });
return context.session.shutdown().then(() => { context.dispose(); });
it('should dispose of the resources used by the context', () => { context.dispose(); expect(context.isDisposed).to.be(true); context.dispose(); expect(context.isDisposed).to.be(true); });
it('should test whether the context is disposed', () => { expect(context.isDisposed).to.be(false); context.dispose(); expect(context.isDisposed).to.be(true); });
it('should be true after the context is disposed', () => { context.dispose(); expect(handler.isDisposed).to.equal(true); });
afterEach(() => { context.dispose(); handler.dispose(); });
afterEach(async () => { await context.session.shutdown(); context.dispose(); });
afterEach(() => { context.dispose(); });