Skip to content

Commit

Permalink
chore: remove ava timing patch (#11024)
Browse files Browse the repository at this point in the history
## Description

This PR removes ava timing patch which was required by a script removed in #10930. This is no longer needed.

### Security Considerations

None

### Scaling Considerations

None

### Documentation Considerations

None

### Testing Considerations

None

### Upgrade Considerations

None
  • Loading branch information
mergify[bot] authored Feb 20, 2025
2 parents 5d2b5c1 + c5c7233 commit 0e76960
Showing 1 changed file with 0 additions and 32 deletions.
32 changes: 0 additions & 32 deletions patches/ava+5.3.1.patch
Original file line number Diff line number Diff line change
Expand Up @@ -94,38 +94,6 @@ index 7630baa..78ced77 100644

notifyOfPeerFailure() {
send({type: 'peer-failed'});
diff --git a/node_modules/ava/lib/reporters/tap.js b/node_modules/ava/lib/reporters/tap.js
index b1989a4..fa1617f 100644
--- a/node_modules/ava/lib/reporters/tap.js
+++ b/node_modules/ava/lib/reporters/tap.js
@@ -45,6 +45,10 @@ function dumpError(error) {
return object;
}

+function durationOut(dur) {
+ return dur ? ` %ava-dur=${dur}ms` : '';
+}
+
export default class TapReporter {
constructor(options) {
this.i = 0;
@@ -96,6 +100,7 @@ export default class TapReporter {
}

writeTest(evt, flags) {
+ evt.title += durationOut(evt.duration);
this.reportStream.write(supertap.test(this.prefixTitle(evt.testFile, evt.title), {
comment: evt.logs,
error: evt.err ? dumpError(evt.err) : null,
@@ -108,7 +113,7 @@ export default class TapReporter {

writeCrash(evt, title) {
this.crashCount++;
- this.reportStream.write(supertap.test(title || evt.err.summary || evt.type, {
+ this.reportStream.write(supertap.test((title || evt.err.summary || evt.type) + durationOut(evt.duration), {
comment: evt.logs,
error: evt.err ? dumpError(evt.err) : null,
index: ++this.i,
diff --git a/node_modules/ava/lib/worker/base.js b/node_modules/ava/lib/worker/base.js
index cdd3c4a..4302a4a 100644
--- a/node_modules/ava/lib/worker/base.js
Expand Down

0 comments on commit 0e76960

Please sign in to comment.