设置在每个测试用例后执行的函数,一般用于用例数据清理等场景。
名称
待执行函数
import * as test from 'testing';test.afterEach('name', () => { // 每个用例执行后执行的代码。}); Copy
import * as test from 'testing';test.afterEach('name', () => { // 每个用例执行后执行的代码。});
设置在每个测试用例后执行的函数,一般用于用例数据清理等场景。