Skip to content

Commit 5349b0f

Browse files
committed
Don't prohibit expect.outputFormat() without a parameter on a nested expect
#784 (comment)
1 parent 55268ea commit 5349b0f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/createTopLevelExpect.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1627,10 +1627,10 @@ expectPrototype.freeze = function () {
16271627
};
16281628

16291629
expectPrototype.outputFormat = function (format) {
1630-
this._assertTopLevelExpect();
16311630
if (typeof format === 'undefined') {
16321631
return this._outputFormat;
16331632
} else {
1633+
this._assertTopLevelExpect();
16341634
this._outputFormat = format;
16351635
return this;
16361636
}

0 commit comments

Comments
 (0)