Mailspring/internal_packages
Evan Morikawa d1c587a01c fix(spec): add support for async specs and disable misbehaving ones
More spec fixes

replace process.nextTick with setTimeout(fn, 0) for specs

Also added an unspy in the afterEach

Temporarily disable specs

fix(spec): start fixing specs

Summary:
This is the WIP fix to our spec runner.

Several tests have been completely commented out that will require
substantially more work to fix. These have been added to our sprint
backlog.

Other tests have been fixed to update to new APIs or to deal with genuine
bugs that were introduced without our knowing!

The most common non-trivial change relates to observing the `NylasAPI` and
`NylasAPIRequest`. We used to observe the arguments to `makeRequest`.
Unfortunately `NylasAPIRequest.run` is argumentless. Instead you can do:
`NylasAPIRequest.prototype.run.mostRecentCall.object.options` to get the
`options` passed into the object. the `.object` property grabs the context
of the spy when it was last called.

Fixing these tests uncovered several concerning issues with our test
runner. I spent a while tracking down why our participant-text-field-spec
was failling every so often. I chose that spec because it was the first
spec to likely fail, thereby requiring looking at the least number of
preceding files. I tried binary searching, turning on and off, several
files beforehand only to realize that the failure rate was not determined
by a particular preceding test, but rather the existing and quantity of
preceding tests, AND the number of console.log statements I had. There is
some processor-dependent race condition going on that needs further
investigation.

I also discovered an issue with the file-download-spec. We were getting
errors about it accessing a file, which was very suspicious given the code
stubs out all fs access. This was caused due to a spec that called an
async function outside ot a `waitsForPromise` block or a `waitsFor` block.
The test completed, the spies were cleaned up, but the downstream async
chain was still running. By the time the async chain finished the runner
was already working on the next spec and the spies had been restored
(causing the real fs access to run).

Juan had an idea to kill the specs once one fails to prevent cascading
failures. I'll implement this in the next diff update

Test Plan: npm test

Reviewers: juan, halla, jackie

Differential Revision: https://phab.nylas.com/D3501

Disable other specs

Disable more broken specs

All specs turned off till passing state

Use async-safe versions of spec functions

Add async test spec

Remove unused package code

Remove canary spec
2016-12-15 13:02:00 -05:00
..
account-sidebar fix(sidebar): Correctly show all accounts in sidebar during initial sync 2016-11-16 22:48:14 -08:00
attachments deps(*): Lift deps out of packages for simpler install / better deduping 2016-11-09 14:24:10 -08:00
category-picker fix(spec): add support for async specs and disable misbehaving ones 2016-12-15 13:02:00 -05:00
composer fix(spec): add support for async specs and disable misbehaving ones 2016-12-15 13:02:00 -05:00
composer-emoji rm(*): Internal packages don’t need engine version locking 2016-11-29 15:12:52 -08:00
composer-markdown 💄(md) Fix markdown styles 2016-11-18 15:38:26 -08:00
composer-signature fix(lint): update files to for new linter version 2016-11-15 10:20:39 -08:00
composer-spellcheck fix(spellchecker) Fix spellchecker specs 2016-11-17 14:51:24 -08:00
composer-templates fix(spec): add support for async specs and disable misbehaving ones 2016-12-15 13:02:00 -05:00
composer-translate rm(*): Internal packages don’t need engine version locking 2016-11-29 15:12:52 -08:00
draft-list deps(*): Lift deps out of packages for simpler install / better deduping 2016-11-09 14:24:10 -08:00
events deps(*): Lift deps out of packages for simpler install / better deduping 2016-11-09 14:24:10 -08:00
github-contact-card rm(*): Internal packages don’t need engine version locking 2016-11-29 15:12:52 -08:00
keybase rm(*): Internal packages don’t need engine version locking 2016-11-29 15:12:52 -08:00
main-calendar feat(event-search): Add event search to calendar 2016-11-15 17:27:31 -08:00
message-autoload-images fix(lint): update files to for new linter version 2016-11-15 10:20:39 -08:00
message-list fix(spec): add support for async specs and disable misbehaving ones 2016-12-15 13:02:00 -05:00
message-view-on-github rm(*): Internal packages don’t need engine version locking 2016-11-29 15:12:52 -08:00
mode-switch fix(copy): Updating language for onboarding tour 2016-09-14 14:16:19 -04:00
notifications fix(sync): Support N1Cloud auth errors. Fix LongConnection cleanup 2016-12-01 12:04:37 -05:00
onboarding feat(auth): add better error state handling 2016-12-07 10:11:22 -08:00
participant-profile deps(*): Lift deps out of packages for simpler install / better deduping 2016-11-09 14:24:10 -08:00
personal-level-indicators rm(*): Internal packages don’t need engine version locking 2016-11-29 15:12:52 -08:00
phishing-detection rm(*): Internal packages don’t need engine version locking 2016-11-29 15:12:52 -08:00
plugins feat(plugin): don't show isHiddenOnPluginsPage 2016-11-16 16:00:56 -08:00
preferences fix(sync): Support N1Cloud auth errors. Fix LongConnection cleanup 2016-12-01 12:04:37 -05:00
print fix(thread-popout) Add missing packages to the 'thread-popout' window 2016-10-18 11:02:30 -07:00
remove-tracking-pixels rm(*): Internal packages don’t need engine version locking 2016-11-29 15:12:52 -08:00
screenshot-mode feat(package): require 'engines': {'nylas': '*'} in package.json 2016-04-25 15:06:37 -07:00
search-index fix(cal): Disable event search for now 2016-11-21 13:50:09 -08:00
send-and-archive deps(*): Lift deps out of packages for simpler install / better deduping 2016-11-09 14:24:10 -08:00
system-tray deps(*): Lift deps out of packages for simpler install / better deduping 2016-11-09 14:24:10 -08:00
theme-picker deps(*): Lift deps out of packages for simpler install / better deduping 2016-11-09 14:24:10 -08:00
thread-list deps(*): Lift deps out of packages for simpler install / better deduping 2016-11-09 14:24:10 -08:00
thread-search fix(search): allow custom search result elements 2016-11-17 16:01:55 -08:00
thread-snooze fix(spec): add support for async specs and disable misbehaving ones 2016-12-15 13:02:00 -05:00
ui-dark build(*): electron-compile, electron-packager instead of custom tooling 2016-11-09 13:52:10 -08:00
ui-darkside (darkside) fixing composer fields spacing (#3020) 2016-11-07 09:49:25 -08:00
ui-less-is-more fix(lint): fix minor linter issue 2016-05-09 13:42:18 -04:00
ui-light build(*): electron-compile, electron-packager instead of custom tooling 2016-11-09 13:52:10 -08:00
ui-taiga feat(sidebar-notifs) Create sidebar notifications to replace old bars 2016-10-04 08:08:23 -07:00
ui-ubuntu fix(size): remove unused docs & screenshots 2016-09-01 11:32:52 -07:00
undo-redo deps(*): Lift deps out of packages for simpler install / better deduping 2016-11-09 14:24:10 -08:00
unread-notifications fix(spec): add support for async specs and disable misbehaving ones 2016-12-15 13:02:00 -05:00
verify-install-location lint(*): Bump to ESLint 3.8 2016-10-17 18:07:35 -07:00
worker-sync fix(spec): add support for async specs and disable misbehaving ones 2016-12-15 13:02:00 -05:00
worker-ui fix(spec): add support for async specs and disable misbehaving ones 2016-12-15 13:02:00 -05:00