@@ -8,6 +8,7 @@ import * as modulesLib from '@hubspot/local-dev-lib/cms/modules';
88import * as ignoreRulesLib from '@hubspot/local-dev-lib/ignoreRules' ;
99import * as themesLib from '@hubspot/local-dev-lib/cms/themes' ;
1010import * as configLib from '@hubspot/local-dev-lib/config' ;
11+ import * as handleFieldsJSLib from '@hubspot/local-dev-lib/cms/handleFieldsJS' ;
1112import { uiLogger } from '../../../lib/ui/logger.js' ;
1213import * as errorHandlers from '../../../lib/errorHandlers/index.js' ;
1314import * as commonOpts from '../../../lib/commonOpts.js' ;
@@ -27,6 +28,7 @@ vi.mock('@hubspot/local-dev-lib/cms/modules');
2728vi . mock ( '@hubspot/local-dev-lib/ignoreRules' ) ;
2829vi . mock ( '@hubspot/local-dev-lib/cms/themes' ) ;
2930vi . mock ( '@hubspot/local-dev-lib/config' ) ;
31+ vi . mock ( '@hubspot/local-dev-lib/cms/handleFieldsJS' ) ;
3032vi . mock ( '../../../lib/errorHandlers/index.js' ) ;
3133vi . mock ( '../../../lib/commonOpts.js' ) ;
3234vi . mock ( '../../../lib/prompts/uploadPrompt.js' ) ;
@@ -64,6 +66,10 @@ const getConfigAccountIfExistsSpy = vi.spyOn(
6466 configLib ,
6567 'getConfigAccountIfExists'
6668) ;
69+ const isConvertableFieldJsSpy = vi . spyOn (
70+ handleFieldsJSLib ,
71+ 'isConvertableFieldJs'
72+ ) ;
6773
6874describe ( 'commands/cms/upload' , ( ) => {
6975 beforeEach ( ( ) => {
@@ -79,6 +85,7 @@ describe('commands/cms/upload', () => {
7985 getThemePreviewUrlSpy . mockReturnValue ( undefined ) ;
8086 // Mock config to prevent reading actual config file in CI
8187 getConfigAccountIfExistsSpy . mockReturnValue ( undefined ) ;
88+ isConvertableFieldJsSpy . mockReturnValue ( false ) ;
8289 } ) ;
8390
8491 describe ( 'command' , ( ) => {
0 commit comments