File tree Expand file tree Collapse file tree 2 files changed +38
-1
lines changed
Expand file tree Collapse file tree 2 files changed +38
-1
lines changed Original file line number Diff line number Diff line change @@ -2,8 +2,10 @@ export { Payment, PaymentRequest } from "./collections";
22export { Transfer , TransferRequest } from "./disbursements" ;
33export * from "./errors" ;
44export {
5- PartyIdType ,
5+ PartyIdType as PayerType ,
66 Party as Payer ,
7+ TransactionStatus as Status ,
8+ Balance ,
79 Environment ,
810 FailureReason ,
911 GlobalConfig ,
Original file line number Diff line number Diff line change 1+ import { AssertionError } from "assert" ;
2+
3+ import * as momo from "../src" ;
4+
5+ import { expect } from "./chai" ;
6+
7+ describe ( "MomoClient" , function ( ) {
8+ describe ( "#create" , function ( ) {
9+ context ( "when there is no callback host" , function ( ) {
10+ it ( "throws an error" , function ( ) {
11+ expect ( momo . create . bind ( null , { } ) ) . to . throw ( AssertionError ) ;
12+ } ) ;
13+ } ) ;
14+
15+ context ( "when there is a callback host" , function ( ) {
16+ it ( "throws doesn't throw an error" , function ( ) {
17+ expect (
18+ momo . create . bind ( null , { callbackHost : "example.com" } )
19+ ) . to . not . throw ( ) ;
20+ } ) ;
21+
22+ it ( "returns a creator for Collections client" , function ( ) {
23+ expect ( momo . create ( { callbackHost : "example.com" } ) )
24+ . to . have . property ( "Collections" )
25+ . that . is . a ( "function" ) ;
26+ } ) ;
27+
28+ it ( "returns a creator for Disbursements client" , function ( ) {
29+ expect ( momo . create ( { callbackHost : "example.com" } ) )
30+ . to . have . property ( "Disbursements" )
31+ . that . is . a ( "function" ) ;
32+ } ) ;
33+ } ) ;
34+ } ) ;
35+ } ) ;
You can’t perform that action at this time.
0 commit comments