samedi 9 juillet 2016

Not able to work with chai-as-promised and ember

I have this simple test :

import {expect} from 'chai';
import {
  describeModel,
  it
} from 'ember-mocha';

describeModel(
  'subscription',
  'Subscription',
  {
    needs: [...]
  },
  function () {
    it('gives the list of activities available WIP', function (assert) {
      expect(Promise.resolve({ foo: "bar" })).to.eventually.have.property("foo");
    });
  }
);

And it's always resolved as a timeout. The promise is correctly fulfilled but it's never checked. What can I do?

Aucun commentaire:

Enregistrer un commentaire