wdio-mocha-framework
Version:
A WebdriverIO plugin. Adapter for Mocha testing framework.
16 lines (12 loc) • 332 B
JavaScript
import path from 'path'
let { context, file } = module.parent.context
let { describe } = context
context.describe = function (name, callback) {
if (callback) {
return describe(...arguments)
} else {
callback = name
name = path.basename(file, '.js')
return describe(name, callback)
}
}