test(aio): fix Chrome getting disconnected during unit tests

Chrome (v58+) often gets disconnected during unit tests (causing them to fail).
This has been happening locally (on Windows) and on Travis. The exact reasons
are not known, but it seems that some of the `AppComponent` tests are to blame.

Based on the discussion in https://github.com/jasmine/jasmine/issues/1327 (and
plenty of trial-and-error), using Jasmine's `done()` callback before each of
test (even calling it synchronously) fixes the issue.
This commit is contained in:
Georgios Kalpakas 2017-06-12 08:44:54 +03:00 committed by Pete Bacon Darwin
parent a1065bfaf0
commit 3d5f520ff0
1 changed files with 4 additions and 1 deletions

View File

@ -59,9 +59,12 @@ describe('AppComponent', () => {
describe('with proper DocViewer', () => {
beforeEach(() => {
// For reasons unknown, not using `done` (even calling it synchronously),
// causes Chrome (v58+) to often get disconnected (at least on Windows and Travis).
beforeEach(done => {
createTestingModule('a/b');
initializeTest();
done();
});
it('should create', () => {