AmpersandJS / ampersand-collection-lodash-mixin

adds handy lodash methods to ampersand-collection
MIT License
3 stars 3 forks source link

Add basic tests #3

Closed HenrikJoreteg closed 9 years ago

HenrikJoreteg commented 9 years ago

We don't need to test the underlying lodash implementations, just that they're getting properly mapped and applied to the models in the collections, so a single call to each one in a test should be sufficient and was unfortunately absent from the current implementation.

klaemo commented 9 years ago

yep, seems reasonable.

klaemo commented 9 years ago

Are collections supposed to work with models that only have model.get(key), but not model[key]?

HenrikJoreteg commented 9 years ago

@klaemo I think we should support both if possible. That way you can use collections to store ampersand models, backbone models, or plain objects if you so choose. Ampersand-models/state all have get method too, btw.