webdriverio/wdio-mocha-framework

View on GitHub
test/fixtures/tests.options.require.js

Summary

Maintainability
A
0 mins
Test Coverage
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)
    }
}