-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix non-failing exceptions in Jasmine tests
There were several errors in the Jasmine tests that produce output on the console but do not seem to fail the test-suite. This patch fixes some of them. It includes also the changes from I5d8d7b2b. The unneeded transition in formatEntityLabel() between jQuery deferreds (which are already spec-compliant promises) and native Promises had the effect of delaying the ItemSelectorWrapper’s formatEntityLabel() handling until the LanguageAndLexicalCategoryWidget test was done, by which time the sinon sandbox would have been restored and $.data() was therefore no longer mocked, resulting in a TypeError that didn’t break the test (because the test was done as far as Jasmine was concerned) but looked ugly in the output. Simply chaining the promise directly is sufficient to fix this :) Further, one test was rewritten to use async/await because it seemed the "afterEach" hook didn't wait until after the done() handler was called. Co-authored-by: Lucas Werkmeister<[email protected]> Change-Id: I5879cdce72de6a6c4f4659cbb082ce9723d451a2
- Loading branch information
Showing
3 changed files
with
33 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters