11import { beforeAll , beforeEach , describe , expect , test } from "bun:test" ;
22import { ids , moov } from "../setup" ;
33import {
4- crateAccountAndGetTransferOptions ,
4+ createAccountAndGetTransferOptions ,
55 createAccount ,
66 createAccountWithWallet ,
77 createBankAccount ,
@@ -10,20 +10,20 @@ import {
1010 UUID_REGEX ,
1111 waitFor ,
1212} from "../utils/utils" ;
13- import type { CreateTransferOptions , PaymentMethod , TransferResponse } from "../../models/components" ;
13+ import type { CreateTransferOptions , PaymentMethod , Transfer , CreatedTransfer , AsyncTransfer } from "../../models/components" ;
1414import { sleep } from "bun" ;
1515import type { CreateTransferRequest } from "../../models/operations" ;
1616
1717let destinationAccountID : string ;
1818let sourcePaymentMethodID : string ;
1919let destinationPaymentMethodID : string ;
20- let transfer : TransferResponse ;
20+ let transfer : Transfer | CreatedTransfer | AsyncTransfer ;
2121describe ( "Transfers" , ( ) => {
22- // Setup accounts and payment methods
2322
2423 describe ( "Transfer Creation" , ( ) => {
2524 beforeAll ( async ( ) => {
26- const availablePaymentMethods = await crateAccountAndGetTransferOptions ( ) ;
25+ // Setup accounts and payment methods
26+ const availablePaymentMethods = await createAccountAndGetTransferOptions ( ) ;
2727 sourcePaymentMethodID = availablePaymentMethods . sourceOptions ! [ 0 ] . paymentMethodID ! ;
2828 destinationPaymentMethodID = availablePaymentMethods . destinationOptions ! [ 0 ] . paymentMethodID ! ;
2929 } ) ;
@@ -99,7 +99,7 @@ describe("Transfers", () => {
9999 } ;
100100
101101 await expect ( ( ) => moov . transfers . create ( transferRequest ) ) . toThrowError (
102- ' API error occurred: {"amount":"amount value must be greater than or equal to 0.01"}' ,
102+ / A P I e r r o r o c c u r r e d : { " a m o u n t " : " a m o u n t v a l u e m u s t b e g r e a t e r t h a n o r e q u a l t o 0 .0 1 " } / i ,
103103 ) ;
104104 } ) ;
105105 } ) ;
0 commit comments