Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow two-phase dependency resolution notifications #8

Merged
merged 1 commit into from
Oct 19, 2023

Conversation

jolexxa
Copy link
Member

@jolexxa jolexxa commented Oct 19, 2023

this introduces a small change that allows for two callbacks to be invoked after dependencies are resolved. the new one, Setup, will be invoked before OnResolved if (and only if) the node's IsTesting flag (added to the node by this PowerUp) is set to false (which it is by default).

this makes it easier to unit test. often, you need to initialize values in production that you want to override in a test, but you need them in separate methods or you have no way to inject the fake stuff in.

@jolexxa jolexxa merged commit 103c70a into main Oct 19, 2023
4 checks passed
@jolexxa jolexxa deleted the feat/two-phase-resolution branch October 19, 2023 00:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant