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

idea: fixtures in tests (or simething like that) #570

Closed
Rikkuru opened this issue Dec 13, 2023 · 2 comments
Closed

idea: fixtures in tests (or simething like that) #570

Rikkuru opened this issue Dec 13, 2023 · 2 comments

Comments

@Rikkuru
Copy link
Contributor

Rikkuru commented Dec 13, 2023

So I recently heard about a guy who created a lib that tries to add fixtures to golang unit tests - https://github.com/rekby/fixenv

Did not have a chance to tesk it yet but the approach seems fitting for this project ? (there are some examples in readme )

If we need to run a test with 2 users and setup their folders and messages but we might just write fixtures that create those objects and delete them after the test is done. Object can be created just by calling a fixture in test instead of adding more and more serivice code in newClientServerPair or adding other pairs.

You probabli have a plan for tests , just thought you to mention it

@emersion
Copy link
Owner

I'd prefer to not add any extra deps for testing, and write tests similarly to the stdlib. I don't think we need to cleanup the server after tests, creating a new in-memory server is very cheap.

@Rikkuru
Copy link
Contributor Author

Rikkuru commented Dec 13, 2023

ok ok

@Rikkuru Rikkuru closed this as completed Dec 13, 2023
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

2 participants