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
It can't be tested when a library is dynamically loaded through the script tag. #481
Comments
I'm not sure if that is supported in your choice of dom implementation. This doesn't sounds like it has anything to do with the test utils. |
I don't think that'll work in jsdom. Best try it in a more minimal environment (w/o test utils). We have not implemented a We need to determine if this is a test utils problem, or jsdom problem. Then we can proceed with how to test this. |
@lmiller1990
|
I studied the documentation of jsdom and found that adding this option in jest.config.js then the CesiumJS loaded successfully.
But I encountered a new problem, jsdom does not support webgl... |
I have tested almost all testEnvironment of jest, and finally only |
Hi~
My component uses the following way to load a JS library:
and the test code is:
In my case, the business logic was processed after $script.onload. But I found that this logic cannot be tested with @vue/test-utils. Is it not supported or am I using it incorrectly? The attachment can reproduce the problem I described.
test.zip
Best wish
The text was updated successfully, but these errors were encountered: