Description
Describe the feature you'd like:
Jest-Extended has an assertion named the same as jest-dom's one:
-> https://github.com/jest-community/jest-extended#tobeempty
-> https://github.com/testing-library/jest-dom#tobeempty
When both libs are used in the same project, the version of jest-extended
overwrites the one from jest-dom.
Describe alternatives you've considered:
Maybe an option is to add an alias for toBeEmpty
named toBeEmptyNode
?
Teachability, Documentation, Adoption, Migration Strategy:
I am not sure at this moment how the things work, could it be an option to have 2 names for the same assertion?
If yes, then the documentation could say:
"if you are using jest-extended, then use toBeEmptyNode
" or something like this
edit
I have raised a feature request in Jest Itself asking for a feat that warns the user about the name collision and points out to a link where is documented a way to rename one of the colliding names in the project where the situation happens.
It could be that the warning and the documentation of how to solve it in projects, might be enough to address this and similar situations like this one.