storj/web/satellite/tests/unit/mock/api/credits.ts

20 lines
461 B
TypeScript
Raw Normal View History

// Copyright (C) 2019 Storj Labs, Inc.
// See LICENSE for copying information.
import { CreditsApi, CreditUsage } from '@/types/credits';
/**
* Mock for CreditsApi
*/
export class CreditsApiMock implements CreditsApi {
private mockCredits: CreditUsage;
get(): Promise<CreditUsage> {
return Promise.resolve(this.mockCredits);
}
public setMockCredits(mockCredits: CreditUsage): void {
this.mockCredits = mockCredits;
}
}