diff --git a/packages/devextreme-react/src/core/__tests__/integration/integration.test.tsx b/packages/devextreme-react/src/core/__tests__/integration/integration.test.tsx new file mode 100644 index 000000000000..3bead0c2bcda --- /dev/null +++ b/packages/devextreme-react/src/core/__tests__/integration/integration.test.tsx @@ -0,0 +1,48 @@ +import * as testingLib from '@testing-library/react'; +import * as React from 'react'; + +import { useState, useEffect } from 'react'; +import SelectBox from '../../../select-box'; +import TextBox from '../../../text-box'; + +jest.useFakeTimers(); + +describe('selectbox', () => { + afterEach(() => { + jest.clearAllMocks(); + testingLib.cleanup(); + }); + + it('renders selectbox in strict mode when data source is specified dynamically without errors', () => { + const Field = (data: any) => { + return (); + } + + const list = [{ ID: 1, Name: 'Item 1' }]; + + const SelectBoxWithDynamicDataSource = () => { + const [items, setItems] = useState([{}]); + + useEffect(() => { + setItems(list); + }, []); + + return ( + + ); + }; + + const renderSelectBox = () => testingLib.render( + + + + ); + + expect(renderSelectBox).not.toThrow(); + }); +}); \ No newline at end of file