Support pending specs with an empty body

This commit is contained in:
Ash Wilson 2017-06-22 08:32:54 -04:00
parent c8882ca92b
commit d858e37058
No known key found for this signature in database
GPG Key ID: 81B1DDB704F69D2A

View File

@ -20,6 +20,11 @@ export function afterEach (fn) {
['it', 'fit', 'ffit', 'fffit'].forEach(function (name) {
module.exports[name] = function (description, fn) {
if (fn === undefined) {
global[name](description)
return
}
global[name](description, function () {
const result = fn()
if (result instanceof Promise) {