               editorView = atom.workspaceView.getActiveView()
               eventHandler = jasmine.createSpy("activation-event")
               editorView.command 'activation-event', eventHandler
-              editorView.trigger 'activation-event'
+              editorView[0].dispatchEvent(new CustomEvent('activation-event', bubbles: true))
               expect(mainModule.activate.callCount).toBe 1
               expect(mainModule.activationEventCallCount).toBe 1
               expect(eventHandler.callCount).toBe 1
-              editorView.trigger 'activation-event'
+              editorView[0].dispatchEvent(new CustomEvent('activation-event', bubbles: true))
               expect(mainModule.activationEventCallCount).toBe 2
               expect(eventHandler.callCount).toBe 2
               expect(mainModule.activate.callCount).toBe 1

          [mainModule, promise] = []

          beforeEach ->
            mainModule = require './fixtures/packages/package-with-activation-events/index'
            spyOn(mainModule, 'activate').andCallThrough()
            spyOn(Package.prototype, 'requireMainModule').andCallThrough()


          it "defers requiring/activating the main module until an activation event bubbles to the root view", ->
            expect(promise.isFulfilled()).not.toBeTruthy()
            atom.workspaceView[0].dispatchEvent(new CustomEvent('activation-event', bubbles: true))

            waitsForPromise ->
              promise
