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

Support writing references to the fixtures #85

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

holm
Copy link

@holm holm commented Dec 18, 2017

This is a work-in-progress, and was mostly to see if there is any interest in this.

It supports giving a fixture a name, and writing out the primary key of the instance after it has been inserted. This is very convenient for unit tests, since you can reference the fixture by name rather than directly by id.

@papandreou
Copy link

@holm, I just ran into a failing test that was caused by another test accidentally modifying an object inside the value exported from the reference file. I think it would make sense to do a deep Object.freeze on the value to prevent that. In strict mode that would cause attempted mutations to throw a TypeError, which would help with tracking down the offending test.

Let me know if think it's a good idea, then I'll take a stab at it :)

@alexjeffburke alexjeffburke deleted the features/reference branch July 3, 2020 13:56
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.

2 participants