Ember-cli: Assertion Failed: Unable to find transform for

Created on 12 Sep 2014  路  3Comments  路  Source: ember-cli/ember-cli

Error appear when I try test my application (ember test --server), but tests passed in browser ( /tests )

import DS from 'ember-data';

export default DS.Transform.extend({
  deserialize: function(serialized) {
    return serialized;
  },

  serialize: function(deserialized) {
    return deserialized;
  }
});

No difference between generated transform

Most helpful comment

For anyone else from Google, you probably need to specify your custom transform in your test:

import { test, moduleForModel } from 'ember-qunit';

moduleForModel('device', 'Device', {
  // make sure to bring in the transform!
  needs: ['model:camera-source', 'model:ingest', 'transform:raw'] 
});

test('it exists', function() {
  var model = this.subject();
  ok(model);
});

All 3 comments

Can you show the test that is failing? I suspect you need to carefully read the ember Qunit tests

Happy to reopen with steps to reproduce.

For anyone else from Google, you probably need to specify your custom transform in your test:

import { test, moduleForModel } from 'ember-qunit';

moduleForModel('device', 'Device', {
  // make sure to bring in the transform!
  needs: ['model:camera-source', 'model:ingest', 'transform:raw'] 
});

test('it exists', function() {
  var model = this.subject();
  ok(model);
});
Was this page helpful?
0 / 5 - 0 ratings