Skip to content

Commit

Permalink
🎨 [Format] All mock folder files
Browse files Browse the repository at this point in the history
  • Loading branch information
beefchimi committed Jul 30, 2024
1 parent 3339f77 commit 8378f86
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 12 deletions.
3 changes: 1 addition & 2 deletions pkg/mocks/MockAudioBufferSourceNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ const mockParam = new MockAudioParam();

export class MockAudioBufferSourceNode
extends MockAudioScheduledSourceNode
implements AudioBufferSourceNode
{
implements AudioBufferSourceNode {
buffer: AudioBuffer | null;
loop: boolean;
loopEnd: number;
Expand Down
3 changes: 1 addition & 2 deletions pkg/mocks/MockAudioContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ function internalMessage(methodName: string, ...args: unknown[]) {

export class MockAudioContext
extends MockBaseAudioContext
implements AudioContext
{
implements AudioContext {
latencyHint: AudioContextOptions['latencyHint'];
readonly baseLatency = 0;
readonly outputLatency = 0.0123;
Expand Down
5 changes: 1 addition & 4 deletions pkg/mocks/MockAudioDestinationNode.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import {MockAudioNode} from './MockAudioNode';

export class MockAudioDestinationNode
extends MockAudioNode
implements AudioDestinationNode
{
export class MockAudioDestinationNode extends MockAudioNode implements AudioDestinationNode {
readonly maxChannelCount = 2;
}
3 changes: 1 addition & 2 deletions pkg/mocks/MockAudioScheduledSourceNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ function internalMessage(methodName: string, ...args: unknown[]) {

export class MockAudioScheduledSourceNode
extends MockAudioNode
implements AudioScheduledSourceNode
{
implements AudioScheduledSourceNode {
onended: AudioScheduledSourceNode['onended'] = null;

start(_when?: number | undefined): void {
Expand Down
4 changes: 2 additions & 2 deletions pkg/mocks/MockBaseAudioContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ function internalMessage(methodName: string, ...args: unknown[]) {

export class MockBaseAudioContext
extends EventTarget
implements BaseAudioContext
{
implements BaseAudioContext {
// Cannot be `readonly` because `AudioContext` needs
// to update this value from within it’s constructor.
sampleRate = 44100;
Expand Down Expand Up @@ -130,6 +129,7 @@ export class MockBaseAudioContext
_successCallback?: DecodeSuccessCallback | null | undefined,
_errorCallback?: DecodeErrorCallback | null | undefined,
): Promise<AudioBuffer> {
// eslint-disable-next-line ts/return-await
return await new Promise((resolve) => {
const buffer = new MockAudioBuffer({
length: 1,
Expand Down

0 comments on commit 8378f86

Please sign in to comment.