Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: colorio.js patch mocking CSS (#4456)
Adds `patch-package` as suggested in the issue this PR fixes. The goal is to allow `window.CSS` to be mocked `null` in situations such as using JSdom. Tests cover a version that is patched and one that is unpatched to demonstrate the patch truly fixes the issue. fixes: #4400 --- **Developer Notes/Questions** for review: - Someone mentioned the patch step should _not_ be `postinstall`, what should it be instead? - For test coverage purposes it's useful to keep an unpatched version, currently this is done manually in `patches/color.unpatched.js` but perhaps there's a better way - It's a bit gross modifying so many pre-compiled `dist` files - Instead of a patch, we could pull in colorjs.io as a submodule and build it ourselves, unsure how to propagate that to consumers of axe-core however - Perhaps this is fine and I could document how to update the patch in the future --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Steven Lambert <2433219+straker@users.noreply.github.com> Co-authored-by: gaiety-deque <gaiety-deque@users.noreply.github.com>
- Loading branch information
3ef9353
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tanx