We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug
MutationObserver callback should have MutationObserver as second argument.
To Reproduce
I have a test in my test suite that checks if MutationObserver callback gets called with correct arguments.
expect(listener).toHaveBeenCalledWith( [expect.any(MutationRecord)], expect.any(MutationObserver), );
and results in an error:
AssertionError: expected "spy" to be called with arguments: [ [ Any{ …(3) } ], Any{ …(3) } ] Received: 1st spy call: Array [ Array [ Any<MutationRecord>, ], - Any<MutationObserver>, ]
Expected behavior
MutationObserver callback to have MutationObserver as second argument.
Source of this claim:
interface MutationCallback { (mutations: MutationRecord[], observer: MutationObserver): void; }
Screenshots
Commit with tests failing after replacing JSDom with Happy DOM: wojtekmaj/react-hooks@cc74f9a
The text was updated successfully, but these errors were encountered:
Skip testing second argument of MutationCallback
b6e5401
See capricorn86/happy-dom#1113
8d7c710
capricorn86#1113@patch: Fixes second parameter missing from MutationO…
6a40d9e
…bserver callback.
Merge pull request #1117 from wojtekmaj/observer-second-argument
09d273f
#1113@patch: Fixes second parameter missing from MutationObserver callback.
Successfully merging a pull request may close this issue.
Describe the bug
MutationObserver callback should have MutationObserver as second argument.
To Reproduce
I have a test in my test suite that checks if MutationObserver callback gets called with correct arguments.
and results in an error:
Expected behavior
MutationObserver callback to have MutationObserver as second argument.
Source of this claim:
Screenshots
Commit with tests failing after replacing JSDom with Happy DOM:
wojtekmaj/react-hooks@cc74f9a
The text was updated successfully, but these errors were encountered: