@@ -15,6 +15,7 @@ import {
15
15
PaypalExpressPaymentStrategy ,
16
16
PaypalProPaymentStrategy ,
17
17
SagePayPaymentStrategy ,
18
+ SquarePaymentStrategy ,
18
19
} from './strategies' ;
19
20
20
21
describe ( 'CreatePaymentStrategyRegistry' , ( ) => {
@@ -31,62 +32,67 @@ describe('CreatePaymentStrategyRegistry', () => {
31
32
expect ( registry ) . toEqual ( expect . any ( PaymentStrategyRegistry ) ) ;
32
33
} ) ;
33
34
34
- it ( 'can instanciate amazon' , ( ) => {
35
+ it ( 'can instantiate amazon' , ( ) => {
35
36
const paymentStrategy = registry . get ( 'amazon' ) ;
36
37
expect ( paymentStrategy ) . toBeInstanceOf ( AmazonPayPaymentStrategy ) ;
37
38
} ) ;
38
39
39
- it ( 'can instanciate afterpay' , ( ) => {
40
+ it ( 'can instantiate afterpay' , ( ) => {
40
41
const paymentStrategy = registry . get ( 'afterpay' ) ;
41
42
expect ( paymentStrategy ) . toBeInstanceOf ( AfterpayPaymentStrategy ) ;
42
43
} ) ;
43
44
44
- it ( 'can instanciate creditcard' , ( ) => {
45
+ it ( 'can instantiate creditcard' , ( ) => {
45
46
const paymentStrategy = registry . get ( 'creditcard' ) ;
46
47
expect ( paymentStrategy ) . toBeInstanceOf ( CreditCardPaymentStrategy ) ;
47
48
} ) ;
48
49
49
- it ( 'can instanciate klarna' , ( ) => {
50
+ it ( 'can instantiate klarna' , ( ) => {
50
51
const paymentStrategy = registry . get ( 'klarna' ) ;
51
52
expect ( paymentStrategy ) . toBeInstanceOf ( KlarnaPaymentStrategy ) ;
52
53
} ) ;
53
54
54
- it ( 'can instanciate legacy' , ( ) => {
55
+ it ( 'can instantiate legacy' , ( ) => {
55
56
const paymentStrategy = registry . get ( 'legacy' ) ;
56
57
expect ( paymentStrategy ) . toBeInstanceOf ( LegacyPaymentStrategy ) ;
57
58
} ) ;
58
59
59
- it ( 'can instanciate offline' , ( ) => {
60
+ it ( 'can instantiate offline' , ( ) => {
60
61
const paymentStrategy = registry . get ( 'offline' ) ;
61
62
expect ( paymentStrategy ) . toBeInstanceOf ( OfflinePaymentStrategy ) ;
62
63
} ) ;
63
64
64
- it ( 'can instanciate offsite' , ( ) => {
65
+ it ( 'can instantiate offsite' , ( ) => {
65
66
const paymentStrategy = registry . get ( 'offsite' ) ;
66
67
expect ( paymentStrategy ) . toBeInstanceOf ( OffsitePaymentStrategy ) ;
67
68
} ) ;
68
69
69
- it ( 'can instanciate paypal' , ( ) => {
70
+ it ( 'can instantiate paypal' , ( ) => {
70
71
const paymentStrategy = registry . get ( 'paypal' ) ;
71
72
expect ( paymentStrategy ) . toBeInstanceOf ( PaypalProPaymentStrategy ) ;
72
73
} ) ;
73
74
74
- it ( 'can instanciate paypalexpress' , ( ) => {
75
+ it ( 'can instantiate paypalexpress' , ( ) => {
75
76
const paymentStrategy = registry . get ( 'paypalexpress' ) ;
76
77
expect ( paymentStrategy ) . toBeInstanceOf ( PaypalExpressPaymentStrategy ) ;
77
78
} ) ;
78
79
79
- it ( 'can instanciate paypalexpresscredit' , ( ) => {
80
+ it ( 'can instantiate paypalexpresscredit' , ( ) => {
80
81
const paymentStrategy = registry . get ( 'paypalexpresscredit' ) ;
81
82
expect ( paymentStrategy ) . toBeInstanceOf ( PaypalExpressPaymentStrategy ) ;
82
83
} ) ;
83
84
84
- it ( 'can instanciate sagepay' , ( ) => {
85
+ it ( 'can instantiate sagepay' , ( ) => {
85
86
const paymentStrategy = registry . get ( 'sagepay' ) ;
86
87
expect ( paymentStrategy ) . toBeInstanceOf ( SagePayPaymentStrategy ) ;
87
88
} ) ;
88
89
89
- it ( 'can instanciate nopaymentdatarequired' , ( ) => {
90
+ it ( 'can instantiate square' , ( ) => {
91
+ const paymentStrategy = registry . get ( 'square' ) ;
92
+ expect ( paymentStrategy ) . toBeInstanceOf ( SquarePaymentStrategy ) ;
93
+ } ) ;
94
+
95
+ it ( 'can instantiate nopaymentdatarequired' , ( ) => {
90
96
const paymentStrategy = registry . get ( 'nopaymentdatarequired' ) ;
91
97
expect ( paymentStrategy ) . toBeInstanceOf ( NoPaymentDataRequiredPaymentStrategy ) ;
92
98
} ) ;
0 commit comments