Spec tests have always confused the hell out of me. Here’s a test that used to work fine, but is now failing. Probably since an upgrade.
EventWatch = require '../lib/event-watch' describe 'EventWatch', -> [element] =  beforeEach -> workspaceElement = atom.views.getView(atom.workspace) jasmine.attachToDOM(workspaceElement) waitsForPromise -> atom.packages.activatePackage('status-bar') waitsForPromise -> atom.packages.activatePackage('event-watch') runs -> element = EventWatch.element describe 'after initialization', -> it 'element is in the status bar', -> expect(element).toBeDefined() it 'element has expected data', -> element.getDatetime = -> new Date(1982, 4, 24, 5, 30) [...]
The first test passes fine, the second test fails because
element is null. This used to work. I changed nothing but my package README and now the test is failing.