ember-data-test-helpers
v0.1.0
Published
Addon for testing easier testing of ember-data adapters, models and serializers
Downloads
1
Readme
ember-data-test-helpers
This addon provides several APIs to facilitate testing ember-data
adapters, models, and serializers.
These APIs are improvements that can now be introduced because of the progress introduced with RFC-232 as of
[email protected]
API
import { setupStoreTest, setupSerializerTest } from 'ember-data-test-helpers'
setupStoreTest(hooks)
this.store(/* dasherizedStoreName*/)
-> returns an instance of aDS.Store
.this.createSnapshot(model, options)
-> returns aDS.Snapshot
of the givenDS.Model
instance
setupSerializerTest(hooks)
Provides all APIs from setupStoreTest
as well as
this.serializer(dasherizedSerializerName /* , store */)
-> returns an instance of the given serializer ready for testing.
Installation
ember install ember-data-test-helpers
Development
git clone [email protected]:alexander-alvarez/ember-data-test-helpers.git
cd ember-data-test-helpers
yarn install
Running
ember serve
- Visit your app at http://localhost:4200.
Running Tests
npm test
(Runsember try:each
to test your addon against multiple Ember versions)ember test
ember test --server
Building
ember build
For more information on using ember-cli, visit https://ember-cli.com/.