@@ -5,9 +5,7 @@ const mockClient = {
55} ;
66
77vi . mock ( '@contentstack/marketplace-sdk' , ( ) => ( {
8- default : {
9- client : vi . fn ( ( ) => mockClient ) ,
10- } ,
8+ client : vi . fn ( ( ) => mockClient ) ,
119} ) ) ;
1210
1311vi . mock ( '../../../src/constants/index.js' , ( ) => ( {
@@ -17,7 +15,7 @@ vi.mock('../../../src/constants/index.js', () => ({
1715 } ,
1816} ) ) ;
1917
20- import contentstack from '@contentstack/marketplace-sdk' ;
18+ import { client as marketplaceClient } from '@contentstack/marketplace-sdk' ;
2119import {
2220 getAllApps ,
2321 getAppManifestAndAppConfig ,
@@ -48,7 +46,7 @@ describe('market-app.utils', () => {
4846 } ) ;
4947
5048 expect ( result ) . toEqual ( mockItems ) ;
51- expect ( contentstack . client ) . toHaveBeenCalledWith ( {
49+ expect ( marketplaceClient ) . toHaveBeenCalledWith ( {
5250 authtoken : 'token-xyz' ,
5351 host : 'developerhub-api.contentstack.com' ,
5452 } ) ;
@@ -66,7 +64,7 @@ describe('market-app.utils', () => {
6664 region : 'EU' ,
6765 } ) ;
6866
69- expect ( contentstack . client ) . toHaveBeenCalledWith ( {
67+ expect ( marketplaceClient ) . toHaveBeenCalledWith ( {
7068 authtoken : 'token' ,
7169 host : 'eu-developerhub-api.contentstack.com' ,
7270 } ) ;
0 commit comments