…so that we can write unit tests for code in the main process. Below a
list of conventions we'll be adopting:
1. Use mocha as the test framework.
2. Use chai as the assertion library.
3. Name specs `foo-bar.spec.js`, to prevent the renderer process from
running specs written fro the main process e.g. when calling
`atom --test spec`.
4. Write specs in ES6.
Although somewhat inconsistent with the conventions we use for renderer
process specs, this will hopefully be a first step towards migrating our
entire Jasmine 1.3 test suite to a more modern environment.
…so that other event handlers have the chance to execute even if the
user doesn't choose an option in the message box. This will allow us to
recover files when a window crashes.
In Electron 0.37.3 the default background color has changed from white
to transparent, and as per the sub pixel anti-aliasing specification,
the layer which hosts the glyphs that need to be rendered needs to have
an opaque background.
We have also observed that upon reload everything seems to work smoothly
even without this fix: this probably points in the direction of a
regression in Electron, but in the meantime this fix should suffice to
allow us to proceed.
Rendering those line numbers in the gutter isn't useful, and it puts
unneeded pressure to the DOM. In the process of changing
`updateLineNumbersState`, we have also refactored it to stop relying on
row ranges being contiguous. This allows that code path to be:
1. Less error-prone, because we were trying to access rows that weren't
actually rendered, thus potentially throwing errors when measuring
non-contiguous screen rows that weren't visible.
2. Tighter, because we can just iterate over each screen row and ask for
its soft-wrap descriptor.
There's a distinction to make between rendered and visible rows, and we
were using the former as if it was the latter. In particular, if a tile
is visible, all its rows get rendered on screen, even though they might
not necessarily be visible by the user.