@@ -8,6 +8,8 @@ import { binlookup } from "../typings";
88import { ApiConstants } from "../constants/apiConstants" ;
99import { paymentMethodsSuccess } from "../__mocks__/checkout/paymentMethodsSuccess" ;
1010import Config from "../config" ;
11+ import LibraryConstants from "../constants/libraryConstants" ;
12+
1113
1214beforeEach ( ( ) : void => {
1315 nock . cleanAll ( ) ;
@@ -108,9 +110,9 @@ describe("HTTP Client", function (): void {
108110 const client = createClient ( ) ;
109111 const checkout = new CheckoutAPI ( client ) ;
110112
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 ;
114116
115117 const scope = nock ( "https://checkout-test.adyen.com/v71" , {
116118 reqheaders : {
@@ -145,9 +147,9 @@ describe("HTTP Client", function (): void {
145147 client . config . applicationName = "testApp" ;
146148 const checkout = new CheckoutAPI ( client ) ;
147149
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 ;
151153
152154 const scope = nock ( "https://checkout-test.adyen.com/v71" , {
153155 reqheaders : {
0 commit comments