Skip to content

Static assets tests don't verify HEAD route registration #82

@VikramAditya33

Description

@VikramAditya33

The tests for useStaticAssets() are inconsistent. The implementation correctly registers both GET and HEAD routes for each call (lines 823-824 in uws-platform.adapter.ts), but most tests only verify GET route registration.

The test "should register multiple static asset routes when called multiple times" correctly expects 4 registrations (GET + HEAD for each call), but the single-call tests like "should enable static assets and register catch-all route" only verify the GET route.

We should update the single-call tests to also verify HEAD route registration and check that toHaveBeenCalledTimes(2) to match the actual implementation behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomerstesta fix around any test

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions