Add tests to ensure resolved modules are singleton instances #9093
Labels
A-Developer-Experience
A-Testing
Testing, code coverage, etc.
T-Task
Tasks for the team like planning
There may be cases today where
require('<X>')
gives different instances depending on where you are requiring from. This is generally not expected or intended for a well-functioning JS module system. (It is believed this may occur today across the high-level boundaries like Riot vs. SDKs, perhaps because we have not yet integrated them into a single build.)We should ensure this works as expected for a consistent developer experience and add tests to ensure it stays that way going forward.
See also: matrix-org/matrix-react-sdk#2770 (comment)
The text was updated successfully, but these errors were encountered: