website refactor
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { WalletTransactionViewModel } from './WalletTransactionViewModel';
|
||||
import { WalletTransactionViewModel, FullTransactionDto } from './WalletTransactionViewModel';
|
||||
|
||||
const createTx = (overrides: Partial<any> = {}): any => ({
|
||||
const createTx = (overrides: Partial<FullTransactionDto> = {}): FullTransactionDto => ({
|
||||
id: 'tx-1',
|
||||
type: 'sponsorship',
|
||||
description: 'Test',
|
||||
@@ -44,7 +44,7 @@ describe('WalletTransactionViewModel', () => {
|
||||
});
|
||||
|
||||
it('derives typeDisplay and formattedDate', () => {
|
||||
const vm = new WalletTransactionViewModel(createTx({ type: 'membership' as any }));
|
||||
const vm = new WalletTransactionViewModel(createTx({ type: 'membership' }));
|
||||
|
||||
expect(vm.typeDisplay).toBe('Membership');
|
||||
expect(typeof vm.formattedDate).toBe('string');
|
||||
|
||||
Reference in New Issue
Block a user