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

Using fake data for testing #198

Closed
matthewp opened this issue Nov 28, 2016 · 1 comment
Closed

Using fake data for testing #198

matthewp opened this issue Nov 28, 2016 · 1 comment

Comments

@matthewp
Copy link
Contributor

If a dev wants to provide fake data for testing purposes there currently isn't a good way to do so. They could override the model's getList, etc. methods, but then they would have to reset it on each test.

The way I've been thinking about it would be a way to inject data to be used in the next iteration. Something like:

Todo.inject("getList", { some: "data" })

The next time getList is called, this data would be used. I don't seriously like this API at this point, just starting with it for the sake of discussion.

@matthewp
Copy link
Contributor Author

Closing in favor of canjs/can-fixture#89

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