Mocha Asynchronous asyncawait

suggest change
const { expect } = require('chai')

describe('Suite Name', function() {
  describe('#method()', function() {
    it('should run without an error', async function() {
      const result = await answerToTheUltimateQuestion()
      expect(result).to.be.equal(42)
    })
  })
})

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents