import * as globalEvents from '../../src/notebook/global-events';
import * as kernel from '../../src/notebook/kernel/shutdown';

import chai, { expect } from 'chai';
import sinon from 'sinon';
import sinonChai from 'sinon-chai';

chai.use(sinonChai);

import { dummyStore } from '../utils';

describe('unload', () => {
  it('should force a kernel shutdown', () => {
    const store = dummyStore();
    const forceShutdownKernel = sinon.spy(kernel, 'forceShutdownKernel');
   
    globalEvents.unload(store);
    
    forceShutdownKernel.restore();
    expect(forceShutdownKernel).to.be.called;
  });
});

@@ -593,12 +593,254 @@
 ;%0A  %7D);%0A%7D);%0A
+%0Adescribe('initGlobalHandlers', () =%3E %7B%0A  it('adds an unload poperty to the window object', () =%3E %7B%0A    const store = dummyStore();%0A    globalEvents.initGlobalHandlers(store);%0A    expect(global.window.onunload).to.not.be.undefined;%0A  %7D);%0A%7D);%0A

Add tests for global-events