ember.js - ember-cli / ember-data model unit tests using http-mocks -
i using ember-cli / ember-cli-mocha testing. have generated http-mock work when run app via ember serve
. however, when run tests -- (e.g. see below...), error:
sheet calculates exported fields ✘ assertion failed: unable find fixtures model type (subclass of ds.model). if you're defining fixtures using `model.fixtures = ...`, please change `model.reopenclass({ fixtures: ... })`.
i presume unit test setup must set store use fixtures. there configuration somewhere use http-mocks instead?
start of test ...
'calculates exported fields', -> # now, exported fields fields , variables expected = `new set()` sheet = null store = @store() ember.run -> store.find('sheet', '1').then( (sheet_)-> sheet = sheet_ promise.all([ sheet.get('fields'), sheet.get('formulas')]) ).then((args)-> [fields, formulas] = args fields.foreach (f)->expected.add(f) ...
answer on ember-cli home page:
mocks development. entire /server directory ignored during ember build , ember test.
however, there addon ember.js: ember-cli-testem-http-mocks
Comments
Post a Comment