Skip to content

Code injection config #5133

@brettz9

Description

@brettz9

In working on our IndexedDB polyfill, leveraging your test server when doing browser testing appears most promising, but we need to inject our polyfill code into the IndexedDB tests, and it is not convenient for us to keep monkey-patching upon every test update.

Would you be open to a PR to allow passing in a command-line argument (or adding a setting on config.json) to be able to designate say a callback or file with a callback that could selectively inject code into the desired test files before they are served?

While I suspect this might be seen as beyond your immediate scope, depending on how you might wish it implemented, it should only involve a few lines of code. (Our specific need can be met by overriding the wptserve/handlers FileHandler behavior as used by web-platform-tests (via wpt-tools/serve) for HTML files served by IndexedDB.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions