uci-utils-logger/test/amodule.test.js

50 lines
916 B
JavaScript
Raw Normal View History

2018-04-05 15:46:45 -07:00
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()
})
}