Skip to content
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

axe.reset() does not reset branding #2530

Closed
straker opened this issue Sep 23, 2020 · 3 comments
Closed

axe.reset() does not reset branding #2530

straker opened this issue Sep 23, 2020 · 3 comments
Assignees
Labels
core Issues in the core code (lib/core) fix Bug fixes good first issue For first-time contributors hacktoberfest Help contribute during the month of October to participate https://hacktoberfest.digitalocean.com/

Comments

@straker
Copy link
Contributor

straker commented Sep 23, 2020

If you configure axe with custom branding and then call axe.reset(), the custom branding is not reset.

axe.configure({
  branding: {
    brand: 'foo',
    application: 'axe-jest'
  }
});

axe.reset();
console.log(axe._audit.brand);  // foo
@straker straker added core Issues in the core code (lib/core) fix Bug fixes labels Sep 23, 2020
@straker
Copy link
Contributor Author

straker commented Oct 1, 2020

I think the best solution is to set the brand, application, and tagExclude (also doesn't get reset) in the _init function back to their original values.

We'll also need to add tests to the resetRulesAndChecks block to ensure they get reset properly.

@straker straker added good first issue For first-time contributors hacktoberfest Help contribute during the month of October to participate https://hacktoberfest.digitalocean.com/ labels Oct 1, 2020
@Bracciata
Copy link
Contributor

I am working on this now. As a fan of Axe super excited to tackle this issue.

@padmavemulapati
Copy link

axe.reset() is resetting : Verified on latest axe-core 4.0.2.
Uploading image.png…

@straker straker closed this as completed Oct 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Issues in the core code (lib/core) fix Bug fixes good first issue For first-time contributors hacktoberfest Help contribute during the month of October to participate https://hacktoberfest.digitalocean.com/
Projects
None yet
Development

No branches or pull requests

3 participants