Skip to content

Commit

Permalink
Fix linter error
Browse files Browse the repository at this point in the history
  • Loading branch information
inlined committed Dec 13, 2024
1 parent 7454c07 commit 62f7609
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions spec/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,11 @@ export function runHandler(
}
}

public write(writeBody: any, cb: () => void = () => {}) {
public write(writeBody: any, cb?: () => void) {
this.sentBody += typeof writeBody === "object" ? JSON.stringify(writeBody) : writeBody;
// N.B. setImmediate breaks sinon.
setImmediate(cb);
if (cb) {
setImmediate(cb);
}
return true;
}

Expand Down

0 comments on commit 62f7609

Please sign in to comment.