@@ -8,6 +8,8 @@ import { binlookup } from "../typings";
8
8
import { ApiConstants } from "../constants/apiConstants" ;
9
9
import { paymentMethodsSuccess } from "../__mocks__/checkout/paymentMethodsSuccess" ;
10
10
import Config from "../config" ;
11
+ import LibraryConstants from "../constants/libraryConstants" ;
12
+
11
13
12
14
beforeEach ( ( ) : void => {
13
15
nock . cleanAll ( ) ;
@@ -108,9 +110,9 @@ describe("HTTP Client", function (): void {
108
110
const client = createClient ( ) ;
109
111
const checkout = new CheckoutAPI ( client ) ;
110
112
111
- const expectedUserAgent = `adyen-node-api-library/26.1.0` ;
112
- const expectedLibraryName = `adyen-node-api-library` ;
113
- const expectedLibraryVersion = `26.1.0` ;
113
+ const expectedUserAgent = LibraryConstants . LIB_NAME + `/` + LibraryConstants . LIB_VERSION ;
114
+ const expectedLibraryName = LibraryConstants . LIB_NAME ;
115
+ const expectedLibraryVersion = LibraryConstants . LIB_VERSION ;
114
116
115
117
const scope = nock ( "https://checkout-test.adyen.com/v71" , {
116
118
reqheaders : {
@@ -145,9 +147,9 @@ describe("HTTP Client", function (): void {
145
147
client . config . applicationName = "testApp" ;
146
148
const checkout = new CheckoutAPI ( client ) ;
147
149
148
- const expectedUserAgent = `testApp adyen-node-api-library/26.1.0` ; // include applicationName too
149
- const expectedLibraryName = `adyen-node-api-library` ;
150
- const expectedLibraryVersion = `26.1.0` ;
150
+ const expectedUserAgent = `testApp ` + LibraryConstants . LIB_NAME + `/` + LibraryConstants . LIB_VERSION ; // include applicationName too
151
+ const expectedLibraryName = LibraryConstants . LIB_NAME ;
152
+ const expectedLibraryVersion = LibraryConstants . LIB_VERSION ;
151
153
152
154
const scope = nock ( "https://checkout-test.adyen.com/v71" , {
153
155
reqheaders : {
0 commit comments