I want to do something after each describe(not after each testcase) and before each describe, is there any way to do this? I have tried below format, but it gives me error that, before and after not defined, is it possible to do sometask before and after of each describe:
describe('testcase', function () {
before(function () {
--------------
})
beforeEach(function () {
-----------------
})
afterEach(function () {
--------------
})
after(function () {
-----------------
})
it('task1', function () {
-----------
})it('task2', function () {
------------------
})
})
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…