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

Make test functions unaware of location of inputs in context #17

Closed
jstokes opened this issue Jun 18, 2018 · 0 comments
Closed

Make test functions unaware of location of inputs in context #17

jstokes opened this issue Jun 18, 2018 · 0 comments
Assignees

Comments

@jstokes
Copy link
Member

jstokes commented Jun 18, 2018

Test inputs are pulled directly from a ctx map that is passed along from test step to test step. Components are pulled into scope by explicit ::step/component entries. We can unify these two inputs. For example, if our make-foo returns a step:

(make-foo 
  {:foo 123
   :bar "baz"
   ;; Adding a `:qux` to input map based on the context
   :qux (step/lookup :look-here)
   ;; Adding a client key based on test components
   ;; replacing ::step/component
   :client (step/component :foo/client)})

This simplifies test steps in that they do not need to care where inputs from context come from, and are able to work on a single flat make of inputs.

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

No branches or pull requests

1 participant