File tree Expand file tree Collapse file tree
js/__internal/grids/grid_core/ai_assistant/__tests__ Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ import type { CommandResult } from '../types';
2121
2222jest . mock ( '../grid_commands' ) ;
2323
24- const MockedGridCommands = jest . mocked ( GridCommands ) ;
24+ const MockedGridCommands = GridCommands as jest . MockedClass < typeof GridCommands > ;
2525
2626let sendRequestCallbacks : RequestCallbacks < ExecuteGridAssistantCommandResult > = { } ;
2727
@@ -67,10 +67,13 @@ describe('AIAssistantController', () => {
6767 jest . clearAllMocks ( ) ;
6868
6969 // TODO: Rework the tests using updated GridCommands implementation
70- MockedGridCommands . mockImplementation ( ( ) => ( {
71- validate : jest . fn ( ) . mockReturnValue ( true ) ,
72- executeCommands : jest . fn < ( ) => Promise < CommandResult [ ] > > ( ) . mockResolvedValue ( [ { status : 'success' , message : 'sort' } ] ) ,
73- } ) as unknown as GridCommands ) ;
70+ ( MockedGridCommands . mockImplementation as jest . Mock ) . call (
71+ MockedGridCommands ,
72+ ( ) => ( {
73+ validate : jest . fn ( ) . mockReturnValue ( true ) ,
74+ executeCommands : jest . fn < ( ) => Promise < CommandResult [ ] > > ( ) . mockResolvedValue ( [ { status : 'success' , message : 'sort' } ] ) ,
75+ } ) ,
76+ ) ;
7477 } ) ;
7578
7679 describe ( 'getMessageDataSource' , ( ) => {
Original file line number Diff line number Diff line change @@ -180,7 +180,7 @@ export function createPagesRenderer({
180180 'systemjs-babel-build' : '/packages/devextreme/node_modules/systemjs-plugin-babel/systemjs-babel-browser.js' ,
181181 // eslint-disable-next-line spellcheck/spell-checker
182182 zod : '/packages/devextreme/node_modules/zod/lib/index.mjs' ,
183- 'zod-to-json-schema' : '/packages/devextreme/node_modules/zod-to-json-schema/dist/cjs /zodToJsonSchema.js' ,
183+ 'zod-to-json-schema' : '/packages/devextreme/node_modules/zod-to-json-schema/dist/esm /zodToJsonSchema.js' ,
184184 ...cspMap ,
185185 } ;
186186
You can’t perform that action at this time.
0 commit comments