无法与chai-as-promise和ember一起工作

时间:2016-07-09 09:57:36

标签: javascript ember.js promise chai

我有这个简单的测试:

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");
    });
  }
);

它总是被解决为超时。承诺得到了正确的履行,但它从未被检查过。我该怎么办?

0 个答案:

没有答案