Skip to content

[native_assets_cli] Improve hook testing #2241

Open
@dcharkes

Description

@dcharkes

We currently have a testBuildHook and testCodeBuildHook (added in #1377 and refactored afterwards).

These are intended for use in the same package as the hook, and to run the hooks in isolation.

Some things to add to this way of testing:

  • Use the correct working directory.
  • Use process invocation to be able to test exit codes? (The downside would be that you can't use the debugger to step through the code as easily.)
  • A way to provide user-defines.
  • A way to provide assets passed in from other build hooks (a.k.a. metadata).
  • Similar methods for link hooks.
  • Similar methods for data assets.

Note: If lots of hooks start building on top of other hooks, then possibly testing hooks in isolation might prove to be less useful than anticipated. This remains to be seen.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions