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

Hide github.com/matryer/moq dependency in tools.go from importers #2287

Merged
merged 1 commit into from
Jul 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion internal/code/imports_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@ func TestNameForDir(t *testing.T) {

assert.Equal(t, "tmp", NameForDir("/tmp"))
assert.Equal(t, "code", NameForDir(wd))
assert.Equal(t, "internal", NameForDir(wd+"/.."))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apologies for failing to sanity check the tests initially.

Turns out that the assumption behind the this assertion broke due to moving tools.go. I've pointed it at a different path that has no Go code. This seems to match the intent behind the original test for the internal/code/.. path.

I may have misunderstood, so happy for alternative suggestions. 🤔

assert.Equal(t, "docs", NameForDir(wd+"/../../docs"))
assert.Equal(t, "main", NameForDir(wd+"/../.."))
}
File renamed without changes.