Is there a way to get Chai working with asynchronous Mocha tests?

后端 未结 13 2199
自闭症患者
自闭症患者 2020-11-29 21:06

I\'m running some asynchronous tests in Mocha using the Browser Runner and I\'m trying to use Chai\'s expect style assertions:

window.expect = chai.expect;
d         


        
13条回答
  •  无人及你
    2020-11-29 21:23

    If you like promised, try Chai as Promised + Q, which allow something like this:

    doSomethingAsync().should.eventually.equal("foo").notify(done);
    

提交回复
热议问题