You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
Are you using these functions? (The initial one was added by you.)
I don't - but I probably should. Currently, I just have end-to-end tests which run the build hooks by building, and then testing them by running the compiled program. This is not good practice IMO.
We currently have a
testBuildHook
andtestCodeBuildHook
(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:
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.
The text was updated successfully, but these errors were encountered: