Skip to content

Commit

Permalink
! B fixed error when this is null
Browse files Browse the repository at this point in the history
Believe this happens when using angular and jest

Co-Authored-By: lexler <23501754+lexler@users.noreply.github.com>
Co-Authored-By: Pedro Calixto <14999585+pcalixto@users.noreply.github.com>
  • Loading branch information
3 people committed Sep 8, 2023
1 parent 91a90b4 commit e1e8992
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/Approvals.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ var FinalMessages = require('./FinalMessages');
// they won't get a helpful error. So we put this in there - just in case"
if (typeof beforeEach === "function") {
beforeEach(function () {
if (!this){
return;
}
this.verify = function () {
throw new Error("You must call either .mocha()");
};
Expand Down

0 comments on commit e1e8992

Please sign in to comment.