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

refactor: put isContext methods on axe.utils #4524

Merged
merged 2 commits into from
Jul 10, 2024
Merged

Conversation

WilcoFiers
Copy link
Contributor

Had a couple scenarios where this code was getting copied over to other repos. For backward compat reasons that's going to need to stay, but at least if we have these methods on axe.utils we can prevent problems in the future if we change how context works.

No QA needed on this one.

@WilcoFiers WilcoFiers requested a review from a team as a code owner July 3, 2024 12:15
straker
straker previously approved these changes Jul 3, 2024
assert.isFalse(isContextObject(Object.create({ exclude: 'string' })));
});

it('is true for an object with both `include` and `exclude`', () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it a bug or a feature that you can have a context object with invalid values for either include or exclude as long as one is valid? For example {include: [], exclude: 1}. Testing it looks like it works without issues.

It might be nice to have a test for it, but I don't think it's a blocker to the pr.

@WilcoFiers WilcoFiers merged commit a6361bb into develop Jul 10, 2024
21 checks passed
@WilcoFiers WilcoFiers deleted the context-util branch July 10, 2024 10:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants