-
-
Notifications
You must be signed in to change notification settings - Fork 211
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
Using headers attribute on table cells trigger warning when running tests on vue-test-utils context #1634
Comments
It does appear as if only the getter exists for the table cell implementation, thus this would indeed prevent the setting of the appropriate value. Since the headers is purely informational, I am a bit confused as to the current implementation - it kind of seems like it should be allowed to set to any value which is then converted to string as in browsers - cell.headers = {} is entirely legal. (it result in cell.headers // => [object Object]. I am not entirely sure of the context though / why the code is currently the way it is, but it definitely seems like a bug on happy-dom. Proposed fix:
|
Thank you for reporting @rMonell and thank you for the analysis @OlaviSau! 🙂 I believe the reason for why it was implemented the way it was is due to incorrect documentation at MDN: When implementation a lot of elements at once it is easy to miss something 😅 It should be fixed now in v16.2.3. |
Describe the bug
When running tests on a table based vue component using the headers attribute on a cell, I get a rather strange warning (shown below as a screenshot).
I've already open an issue on vue repository (vuejs/core#12502) but I've been advised to open an issue on this repo, so I hope my problem can be cleared up.
Indeed, I haven't been able to clearly identify if the issue was directly related to happy-dom, or to a runtime-dom mechanic used in a test with happy-dom environment.
To Reproduce
Reproduction link
https://codesandbox.io/p/devbox/8kthxl
Steps to reproduce
From the reproduction link
On a terminal, run :
pnpm run test
From a new project
headers
attribute on any of the table cells.Expected behavior
headers attribute on td element should be displayed and interpreted as an HTML attribute.
Screenshots
Device:
The text was updated successfully, but these errors were encountered: