workerd
workerd copied to clipboard
POC for basic web platform test integration
This is just a proof of concept to start working through what is necessary to integrate web platform tests into wd-tests.
There are some limitations to this approach...
- All module imports are evaluated outside of an IoContext, even if they are dynamic imports. This means that no test can schedule any actual i/o. Any test that depends on setTimeout, for instance, won't work with this pattern. This also means that none of the fetch tests would work under this pattern (EventSource, timers, Web Sockets, etc, all wouldn't be possible with this approach)
- The test harness messes with the global scope. Ideally we'd be running these things in something like a
ShadowRealm... otherwise there's always a possibility of the harness conflicting with the global scope, tho that is unlikely in practice