Skip to content
New issue

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

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

Already on GitHub? # to your account

clear doesn't clear the currentMediaQuery #11

Open
seahindeniz opened this issue Jun 25, 2021 · 1 comment
Open

clear doesn't clear the currentMediaQuery #11

seahindeniz opened this issue Jun 25, 2021 · 1 comment

Comments

@seahindeniz
Copy link

seahindeniz commented Jun 25, 2021

Hi,
I think currentMediaQuery should also be cleared. Otherwise, last query continues to exist until it's changed or destroyed.

this.currentMediaQuery = mediaQuery;

public clear(): void {
this.mediaQueries = {};
}

@paddy-brown
Copy link

This is still an issue and causes mocks to bleed into each other. The only solution is to re-create the instance before each test and then tear it down with destroy. Is there any appetite to apply this fix and then release it?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants