Skip to content

Gulp test tasks are failing #4654

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
RobJacobs opened this issue May 18, 2017 · 4 comments · Fixed by #4662
Closed

Gulp test tasks are failing #4654

RobJacobs opened this issue May 18, 2017 · 4 comments · Fixed by #4662
Assignees

Comments

@RobJacobs
Copy link
Contributor

Bug, feature request, or proposal:

Bug

What is the expected behavior?

For the gulp task 'test' and 'test:single-run' to complete

What is the current behavior?

test task fails and crashes Chrome/Firefox.

What are the steps to reproduce?

Run 'gulp test:single-run'

What is the use-case or motivation for changing an existing behavior?

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

Win 10, Node 6.10.2, Karma 1.7.0, Chrome 58.0.3029.110

Is there anything else we should know?

I had to exclude the snack-bar and dialog tests to get the test to complete without hanging.

Also noticed some overlays are not getting cleaned up. When running the tests in debug mode in the browser, after the browser locked up, I can see 12 divs with the cdk-overlay-container class still in the body.

Also seeing several errors in the terminal like:

× should set the width of the overlay if there is no placeholder
Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL.

Which I'm guessing is related to the whenStable() method.

@crisbeto
Copy link
Member

crisbeto commented May 18, 2017

Everything passes for me locally and the only differences seem to be the Karma version (I'm running 1.6) and the Node version (I'm running 6.7), but those seem very unlikely to be causing an issue.

As for the cdk-overlay-container leaks, unless we remove the elements from the DOM manually in tests, there is no good way clean them up, because the element is added by a service, which can't have an OnDestroy method.

@RobJacobs
Copy link
Contributor Author

@crisbeto I've tried on 4 different machines with the same results. All of them had a clean clone of the repo, then ran npm install, then ran gulp test:single-run.

@crisbeto
Copy link
Member

Alright @RobJacobs, it definitely shows up after a clean install.

@crisbeto crisbeto self-assigned this May 18, 2017
crisbeto added a commit to crisbeto/material2 that referenced this issue May 18, 2017
Fixes some unit tests going into an infinite loop by using the `jasmine.any` matcher. Not exactly sure what is going on, but it was most likely introduced in Jasmine 2.6.2. For now I've replaced those matches with `instanceof` checks which accomplish the same.

Fixes angular#4654.
jelbourn pushed a commit that referenced this issue May 22, 2017
Fixes some unit tests going into an infinite loop by using the `jasmine.any` matcher. Not exactly sure what is going on, but it was most likely introduced in Jasmine 2.6.2. For now I've replaced those matches with `instanceof` checks which accomplish the same.

Fixes #4654.
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants