import aClass from '../src' import chai from 'chai' import chaiAsPromised from 'chai-as-promised' chai.use(chaiAsPromised) const expect = chai.expect describe( 'Testing ', function () { hooks() sometests() someothertests() }) //****************** TESTS ********************** function sometests() { it('==> test something', async function () { let result = await someasyncfunction() expect(result, 'test failed').to.equal('expectedresult') }) } function someothertests() { it('==> test something', async function () { let result = await someasyncfunction() expect(result, 'test failed').to.equal('expectedresult') }) } function hooks() { before(async() => { await someasyncfunctiontodobefore() }) beforeEach(async() => { await someasyncfunctiontodobeforeeachtest() }) after(async() => { await someasyncfunctiontodoaftereeachtest() }) }