As per https://github.com/w3c/web-platform-tests/blob/master/docs/test-format-guidelines.md, WPT files such as XX.worker.js should lead to making a test on XX.worker URL. A file src as YY.any.js should lead to making a test on YY.any.html and YY.any.worker. The wpt server will generate the content of each such test using templates. This does not work well with our current infrastructure which requires these files to detect tests.
See for instance: LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/XMLHttpRequest-withCredentials.any.js LayoutTests/imported/w3c/web-platform-tests/IndexedDB/interfaces.worker.js LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/constructor-object.worker.js LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/abort-during-open.worker.js LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-send.worker.js LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/send-usp.worker.js LayoutTests/imported/w3c/web-platform-tests/url/historical.worker.js
This eases test authoring but this does not make our test system simpler... One possibility would be for WPT repo to maintain a script that would generate the missing files based on the templates used by the wpt server. When importing, we would call that script and do regular import.
We create the .html files as dummy empty files.