Mocha Asynchronous asyncawait
suggest changeconst { 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)
})
})
})
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents