Skip to content

Add a "fetchHasChanged" method#26

Open
idolize wants to merge 1 commit intomartyjs:masterfrom
idolize:patch-1
Open

Add a "fetchHasChanged" method#26
idolize wants to merge 1 commit intomartyjs:masterfrom
idolize:patch-1

Conversation

@idolize
Copy link

@idolize idolize commented Jul 16, 2015

This allows use of toPromise() when constructing fetchResult objects manually inside a store without relying on the store's this.fetch().

Very important for unit testing.

This allows use of [`toPromise()`](http://martyjs.org/api/stores/index.html#fetch-result-toPromise) when constructing `fetchResult` objects [manually](http://martyjs.org/api/stores/index.html#fetch_pending) inside a store without relying on the store's `this.fetch()`.

Very important for unit testing.
@taion
Copy link
Member

taion commented Jul 16, 2015

Is this only for testing? I wonder if we can add it to some sort of test support library instead, if that's the case.

@idolize
Copy link
Author

idolize commented Jul 16, 2015

Testing is the main use case most likely, but there could be other times someone would want to use a toPromise(). For now a test library would be useful.

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