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

Capture action locations. #209

Merged
merged 2 commits into from
Nov 28, 2020
Merged

Capture action locations. #209

merged 2 commits into from
Nov 28, 2020

Conversation

jmalloc
Copy link
Member

@jmalloc jmalloc commented Nov 28, 2020

What change does this introduce?

This PR adds the Action.Location() interface, which returns the location within the codebase that the action was created.

I've also move the location package out of the internal folder.

What issues does this relate to?

Prepares for #38 and #162

Why make this change?

Knowing where each action is created lets as include that information in the test reports. Note that is potentially a different code location to where Test.Prepare() or Test.Expect() is called. An action could be constructed elsewhere (like in a BeforeEach(), and Prepare() takes many actions.

Is there anything you are unsure about?

I'm a little bit uncertain about exposing the location package from a future stability point of view, but I want people to be able to write custom actions and expectations outside the testkit module.

@jmalloc jmalloc merged commit 8e15883 into main Nov 28, 2020
@jmalloc jmalloc deleted the action-locations branch November 28, 2020 09:49
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