chore: Switch coverage from istanbul to the v8 provider for speed (#2619)

This commit is contained in:
Dermot Duffy
2026-07-26 14:21:27 -07:00
committed by GitHub
parent 3b8835ee7c
commit ababe133a8
32 changed files with 128 additions and 275 deletions
+4 -4
View File
@@ -53,7 +53,7 @@ export abstract class GeneratedTone implements Tone {
// Current AudioContext time. Subclasses only read this from inside `_play()`
// where the context is always set.
protected get _currentTime(): number {
/* istanbul ignore next: _currentTime is only read by subclasses from
/* v8 ignore next: _currentTime is only read by subclasses from
_play() during an active context -- @preserve */
return this._context?.currentTime ?? 0;
}
@@ -62,7 +62,7 @@ export abstract class GeneratedTone implements Tone {
// of their pattern to loop. No-ops if the context has already been closed so
// a stopped tone can never re-arm its loop.
protected _scheduleNext(intervalSeconds: number): void {
/* istanbul ignore next: defensive guard against a subclass calling
/* v8 ignore next: defensive guard against a subclass calling
_scheduleNext after stop() -- JS single-threading makes this unreachable
from the existing subclasses -- @preserve */
if (!this._context) {
@@ -78,7 +78,7 @@ export abstract class GeneratedTone implements Tone {
return;
}
this._timer.start(intervalSeconds, () => {
/* istanbul ignore next: Timer.stop() cancels pending callbacks, so this
/* v8 ignore next: Timer.stop() cancels pending callbacks, so this
re-entry guard is unreachable in practice -- @preserve */
if (!this._context) {
return;
@@ -89,7 +89,7 @@ export abstract class GeneratedTone implements Tone {
// Plays one note: a smooth tone that rises to peak volume and then fades.
protected _playNote(freq: number, when: number, envelope: ToneEnvelope): void {
/* istanbul ignore next: _playNote is only called by subclasses from
/* v8 ignore next: _playNote is only called by subclasses from
_play() during an active context -- @preserve */
if (!this._context) {
return;
+2 -2
View File
@@ -51,7 +51,7 @@ export class CustomTone implements Tone {
}
private _handleEnded = (): void => {
/* istanbul ignore next: stop() removes this listener before nulling
/* v8 ignore next: stop() removes this listener before nulling
_audio, so the handler can't fire with a null _audio -- @preserve */
if (!this._audio) {
return;
@@ -64,7 +64,7 @@ export class CustomTone implements Tone {
};
private _playAudio(): void {
/* istanbul ignore next: callers (start, _handleEnded) only invoke
/* v8 ignore next: callers (start, _handleEnded) only invoke
_playAudio when _audio is non-null -- @preserve */
if (!this._audio) {
return;