1 min readApr 28, 2019
. it(“should add two numbers by using promise”, (done) =>{
. func.usedPromiseAdd(1,2)
. .then((res)=>{
. expect(res).to.equal(3);
. done();
. }).catch((err) =>{
. expect(err).to.throw;
. done();
. });
. });
加了catch 沒什麼用. 因為不是要測 err