-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add tests #4
Comments
Ok, so This gave me a lead, because if Workers aren't even supported, how was it erroring on |
Ok finally got it to work with Now the only annoying issue remaining is setting up a test runner. The reason it's annoying is because the code needs to be transpiled with Unless there's some other way around this... |
Definitely needed to make some after #2 . I don't have a project to test the
browserify
integration in and apparentlywebworkify
usage differs quite significantly fromwebpack
'sworker-loader
.This issue is more to document my attempts at getting tests to work and failing spectacularly 😕
There's quite some difficulty in getting tests to work as there's a bunch of requirements on browser environments here:
print
not existing in wrappers to Ammo (not that Ammo even usesprint
).browser-env
getsSyntaxError: Failed to execute 'postMessage' on 'Window': Invalid target origin '[object ArrayBuffer]' in a call to 'postMessage'.
because PhysiJS passes anArrayBuffer
as the second arg topostMessage
at least one time (to test ifTransferable
messages / TypedArrays are supported). This is the third argument inWindow.postMessage
but the second inWorker.postMessage
. Perhapsjsdom
didn't implement the latter and is only using the former? Very not sure. Triedjsdom-worker
(withjsdom-global
too) and that gave the same error 😕cypress
doesn't quite fit the model as we're not doing UI tests/UI automation; just need to run tests in a real browser environment 😅 . I feel like I might have to write some tests in the old way in<script>
tags or something to get them to work...The text was updated successfully, but these errors were encountered: