Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

test(ngMock): remove a broken jqLite cache clearing #16515

Merged
merged 1 commit into from
Mar 28, 2018

Conversation

mgol
Copy link
Member

@mgol mgol commented Mar 28, 2018

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

A test change.

What is the current behavior? (You can also link to an open issue here)

angular.element.cache is reset to an empty object in one spec.

What is the new behavior (if this is a feature change)?

It's no longer reset at all.

Does this PR introduce a breaking change?

No.

Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Fix/Feature: Docs have been added/updated
  • Fix/Feature: Tests have been added; existing tests pass

Other information:

This is blocking PR #16512.

This commit removes the resetting of `angular.element.cache` in some tests;
this was desynchronizing jqLite.cache & the local jqCache variable and since
some parts of the code use one of them and some the other one, it was breaking
JQLite._data. `angular.element.cache` doesn't even exist when jQuery 2+ is used.
@mgol mgol force-pushed the no-cache-clearing branch from 265c441 to abac7dc Compare March 28, 2018 10:45
Copy link
Member

@gkalpak gkalpak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I wonder what that line was for (and why it doesn't seem to be necessary any more).

@mgol mgol merged commit feee36c into angular:master Mar 28, 2018
@mgol mgol deleted the no-cache-clearing branch March 28, 2018 11:20
mgol added a commit that referenced this pull request Mar 28, 2018
This commit removes the resetting of `angular.element.cache` in some tests;
this was desynchronizing jqLite.cache & the local jqCache variable and since
some parts of the code use one of them and some the other one, it was breaking
JQLite._data. `angular.element.cache` doesn't even exist when jQuery 2+ is used.

Closes #16515
Refs #16512
@mgol mgol changed the title tests(ngMock): remove a broken jqLite cache clearing test(ngMock): remove a broken jqLite cache clearing Mar 28, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants