vendredi 1 mai 2015

How to create unit tests for Ember.js adapter/serializers?

I'm building an Ember CLI app (v0.2.3), and I have some unit tests that have been generated for me for the adapters and serializer in my app. The generated code looks like this:

// app/serializers/my-model-test.js

// Replace this with your real tests.
test('it serializes records', function (assert) {
  var record = this.subject();

  var serializedRecord = record.serialize();
  assert.ok(serializedRecord);
});

and

// app/adapter/application-test.js

// Replace this with your real tests.
test('it exists', function (assert) {
  var adapter = this.subject();
  assert.ok(adapter);
});

What do I put in these tests? I've built acceptance tests and unit tests for my models and components, but not sure what needs to go in these unit tests. Haven't been able to find documentation on building these unit tests, nor can I find any example applications on GH that have built these tests out.




Aucun commentaire:

Enregistrer un commentaire