import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__ from "react/jsx-runtime";
import "react";
import * as __WEBPACK_EXTERNAL_MODULE__tachybase_client__ from "@tachybase/client";
import * as __WEBPACK_EXTERNAL_MODULE__testing_library_react__ from "@testing-library/react";
describe('DataSourceManagerProvider', ()=>{
    test('should render children', ()=>{
        const dataSourceManager = {};
        const { getByText } = (0, __WEBPACK_EXTERNAL_MODULE__testing_library_react__.render)(/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__tachybase_client__.DataSourceManagerProvider, {
            dataSourceManager: dataSourceManager,
            children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)("div", {
                children: "Test Children"
            })
        }));
        expect(getByText('Test Children')).toBeInTheDocument();
    });
});
describe('useDataSourceManager', ()=>{
    test('should return the data source manager', ()=>{
        const dataSourceManager = {};
        const TestComponent = ()=>{
            const manager = (0, __WEBPACK_EXTERNAL_MODULE__tachybase_client__.useDataSourceManager)();
            expect(manager).toBe(dataSourceManager);
            return null;
        };
        (0, __WEBPACK_EXTERNAL_MODULE__testing_library_react__.render)(/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__tachybase_client__.DataSourceManagerProvider, {
            dataSourceManager: dataSourceManager,
            children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(TestComponent, {})
        }));
    });
});
