diff --git a/__mocks__/svgJsMock.js b/__mocks__/svgJsMock.js new file mode 100644 index 000000000..b376d0388 --- /dev/null +++ b/__mocks__/svgJsMock.js @@ -0,0 +1,5 @@ +const React = require('react'); + +exports['default'] = React.forwardRef((props, ref) => + React.createElement('icon-mock', {ref, ...props}) +); diff --git a/package.json b/package.json index 727728857..5a17b5212 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,8 @@ "start": "concurrently --restart-tries -1 npm:serve npm:dev", "stop": "fis3 server stop", "dev": "fis3 release -cwd ./public", - "deploy-gh-page": "sh ./deploy-gh-pages.sh" + "deploy-gh-page": "sh ./deploy-gh-pages.sh", + "test": "npm test --workspaces" }, "devDependencies": { "fis-optimizer-terser": "^1.0.1", @@ -25,5 +26,40 @@ "fis3-prepackager-stand-alone-pack": "^1.0.0", "fis3-preprocessor-js-require-css": "^0.1.3", "fis3-preprocessor-js-require-file": "^0.1.3" + }, + "jest": { + "testEnvironment": "jsdom", + "collectCoverageFrom": [ + "src/**/*" + ], + "moduleFileExtensions": [ + "ts", + "tsx", + "js" + ], + "transform": { + "\\.(ts|tsx)$": "ts-jest" + }, + "setupFiles": [ + "jest-canvas-mock" + ], + "testRegex": "/.*\\.test\\.(ts|tsx|js)$", + "moduleNameMapper": { + "\\.(css|less|sass|scss)$": "/__mocks__/styleMock.js", + "\\.(svg)$": "/__mocks__/svgMock.js", + "\\.svg\\.js$": "/__mocks__/svgJsMock.js" + }, + "setupFilesAfterEnv": [ + "/packages/amis-core/__tests__/jest.setup.js" + ], + "testPathIgnorePatterns": [ + "/node_modules/", + "/.rollup.cache/" + ], + "globals": { + "ts-jest": { + "diagnostics": false + } + } } } diff --git a/packages/amis-core/__tests__/jest.setup.js b/packages/amis-core/__tests__/jest.setup.js index 7d8723f4f..ebc1648aa 100644 --- a/packages/amis-core/__tests__/jest.setup.js +++ b/packages/amis-core/__tests__/jest.setup.js @@ -5,6 +5,13 @@ const moment = require('moment'); moment.tz.setDefault('Asia/Shanghai'); const cleanup = require('@testing-library/react').cleanup; +// https://github.com/nrwl/nx/issues/1178 +// 解决jest 运行的时候报: +// ReferenceError: DragEvent is not defined +Object.defineProperty(window, 'DragEvent', { + value: class DragEvent {} +}); + global.beforeAll(() => { console.warn = msg => { // warning 先关了,实在太吵。 diff --git a/packages/amis-core/package.json b/packages/amis-core/package.json index f83bdff36..780e8526a 100644 --- a/packages/amis-core/package.json +++ b/packages/amis-core/package.json @@ -77,11 +77,11 @@ ], "testRegex": "/.*\\.test\\.(ts|tsx|js)$", "moduleNameMapper": { - "\\.(css|less|sass|scss)$": "/../__mocks__/styleMock.js", - "\\.(svg)$": "/../__mocks__/svgMock.js" + "\\.(css|less|sass|scss)$": "/../../__mocks__/styleMock.js", + "\\.(svg)$": "/../../__mocks__/svgMock.js" }, "setupFilesAfterEnv": [ - "/__tests__/jest.setup.js" + "/../amis-core/__tests__/jest.setup.js" ], "testPathIgnorePatterns": [ "/node_modules/", @@ -89,35 +89,7 @@ ], "globals": { "ts-jest": { - "diagnostics": false, - "tsconfig": { - "module": "commonjs", - "target": "es5", - "lib": [ - "es6", - "dom", - "ES2015" - ], - "sourceMap": true, - "jsx": "react", - "moduleResolution": "node", - "rootDir": ".", - "importHelpers": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "sourceRoot": ".", - "noImplicitReturns": true, - "noImplicitThis": true, - "noImplicitAny": true, - "strictNullChecks": true, - "experimentalDecorators": true, - "emitDecoratorMetadata": false, - "typeRoots": [ - "./node_modules/@types", - "./types" - ], - "skipLibCheck": true - } + "diagnostics": false } } } diff --git a/packages/amis-core/src/index.tsx b/packages/amis-core/src/index.tsx index ad9efc36b..f55ad2076 100644 --- a/packages/amis-core/src/index.tsx +++ b/packages/amis-core/src/index.tsx @@ -93,6 +93,7 @@ export { updateEnv, Renderer, RendererProps, + RenderOptions, RendererEnv, EnvContext, RegisterStore, diff --git a/packages/amis-formula/package.json b/packages/amis-formula/package.json index 75b297273..fc649a750 100644 --- a/packages/amis-formula/package.json +++ b/packages/amis-formula/package.json @@ -89,35 +89,7 @@ ], "globals": { "ts-jest": { - "diagnostics": false, - "tsconfig": { - "module": "commonjs", - "target": "es5", - "lib": [ - "es6", - "dom", - "ES2015" - ], - "sourceMap": true, - "jsx": "react", - "moduleResolution": "node", - "rootDir": ".", - "importHelpers": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "sourceRoot": ".", - "noImplicitReturns": true, - "noImplicitThis": true, - "noImplicitAny": true, - "strictNullChecks": true, - "experimentalDecorators": true, - "emitDecoratorMetadata": false, - "typeRoots": [ - "./node_modules/@types", - "./types" - ], - "skipLibCheck": true - } + "diagnostics": false } } } diff --git a/packages/amis/__tests__/__snapshots__/factory.test.tsx.snap b/packages/amis/__tests__/__snapshots__/factory.test.tsx.snap deleted file mode 100644 index 8964a0583..000000000 --- a/packages/amis/__tests__/__snapshots__/factory.test.tsx.snap +++ /dev/null @@ -1,643 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`factory custom not found 2! 1`] = ` -
-
- Not Found -
-
-`; - -exports[`factory custom not found 3! 1`] = ` -
-
- Not Found -
-
-`; - -exports[`factory custom not found! 1`] = ` -
-
- Not Found -
-
-`; - -exports[`factory load Renderer on need 1`] = ` -
-
- This is Custom Renderer2, a is - 23 -
-
-`; - -exports[`factory unregistered Renderer 1`] = ` -
-
-
-
-

- Error: 找不到对应的渲染器 -

-

- Path: - my-renderer -

-
-          
-            {
-  "type": "my-renderer",
-  "a": 23
-}
-          
-        
-
-
-
-
-`; - -exports[`factory:definitions 1`] = ` -
-
-
-
-
-

- - - 引用 - - -

-
-
-
-
-

- - - 表单 - - -

-
-
-
- -
- -
-
- -
-
-
- - - -
-
-
- -
-
-
-
-
-
- -
- -
-
- -
-
-
-
- -
-
- -
-
-
- - - -
-
-
- -
- - - -
-
-
-
- - - -
-
-
- -
-
-
-
- - - -
-
-
-
- -
-
-
-`; - -exports[`factory:definitions override 1`] = ` -
-
-
-
-
-

- - - 引用 - - -

-
-
-
-
-

- - - 表单 - - -

-
-
-
- -
- -
-
- -
-
-
- - - -
-
-
- -
- - -
-
- - - -
-
- -
- -
-
-
-`; - -exports[`factory:registerRenderer 1`] = ` -
-
- This is Custom Renderer, a is - 23 -
-
-`; diff --git a/packages/amis/__tests__/components/404.test.tsx b/packages/amis/__tests__/components/404.test.tsx index 16a323b07..4fd5ffcea 100644 --- a/packages/amis/__tests__/components/404.test.tsx +++ b/packages/amis/__tests__/components/404.test.tsx @@ -1,7 +1,7 @@ import React = require('react'); -import NotFound from '../../../amis-ui/src/components/404'; +import {NotFound} from 'amis-ui'; import * as renderer from 'react-test-renderer'; -import '../../src/themes/default'; +import '../../src'; import {render, fireEvent, cleanup} from '@testing-library/react'; afterEach(cleanup); diff --git a/packages/amis/__tests__/event-action/ajax.test.tsx b/packages/amis/__tests__/event-action/ajax.test.tsx index 3db810c98..89aa3f246 100644 --- a/packages/amis/__tests__/event-action/ajax.test.tsx +++ b/packages/amis/__tests__/event-action/ajax.test.tsx @@ -1,6 +1,6 @@ import {fireEvent, render, waitFor} from '@testing-library/react'; -import '../../src/themes/default'; -import {render as amisRender} from '../../src/index'; +import '../../src'; +import {render as amisRender} from '../../src'; import {makeEnv, wait} from '../helper'; test('EventAction:ajax', async () => { diff --git a/packages/amis/__tests__/event-action/copy.test.tsx b/packages/amis/__tests__/event-action/copy.test.tsx index c80a4683e..2e644ed39 100644 --- a/packages/amis/__tests__/event-action/copy.test.tsx +++ b/packages/amis/__tests__/event-action/copy.test.tsx @@ -1,6 +1,6 @@ import {fireEvent, render, waitFor} from '@testing-library/react'; -import '../../src/themes/default'; -import {render as amisRender} from '../../src/index'; +import '../../src'; +import {render as amisRender} from '../../src'; import {makeEnv} from '../helper'; test('EventAction:copy', async () => { diff --git a/packages/amis/__tests__/event-action/custom.test.tsx b/packages/amis/__tests__/event-action/custom.test.tsx index 273806951..3740f547e 100644 --- a/packages/amis/__tests__/event-action/custom.test.tsx +++ b/packages/amis/__tests__/event-action/custom.test.tsx @@ -1,6 +1,6 @@ import {fireEvent, render, waitFor} from '@testing-library/react'; -import '../../src/themes/default'; -import {render as amisRender} from '../../src/index'; +import '../../src'; +import {render as amisRender} from '../../src'; import {makeEnv} from '../helper'; test('EventAction:custom', async () => { diff --git a/packages/amis/__tests__/event-action/dialog.test.tsx b/packages/amis/__tests__/event-action/dialog.test.tsx index 228394a06..21ff61164 100644 --- a/packages/amis/__tests__/event-action/dialog.test.tsx +++ b/packages/amis/__tests__/event-action/dialog.test.tsx @@ -1,6 +1,6 @@ import {fireEvent, render, waitFor} from '@testing-library/react'; -import '../../src/themes/default'; -import {render as amisRender} from '../../src/index'; +import '../../src'; +import {render as amisRender} from '../../src'; import {makeEnv, wait} from '../helper'; test('EventAction:dialog', async () => { diff --git a/packages/amis/__tests__/event-action/disabled.test.tsx b/packages/amis/__tests__/event-action/disabled.test.tsx index c09ad91b5..0ec9d9d6d 100644 --- a/packages/amis/__tests__/event-action/disabled.test.tsx +++ b/packages/amis/__tests__/event-action/disabled.test.tsx @@ -1,6 +1,6 @@ import {fireEvent, render} from '@testing-library/react'; -import '../../src/themes/default'; -import {render as amisRender} from '../../src/index'; +import '../../src'; +import {render as amisRender} from '../../src'; import {makeEnv} from '../helper'; test('EventAction:disabled', async () => { diff --git a/packages/amis/__tests__/event-action/drawer.test.tsx b/packages/amis/__tests__/event-action/drawer.test.tsx index e747dc9cb..b55ceebe8 100644 --- a/packages/amis/__tests__/event-action/drawer.test.tsx +++ b/packages/amis/__tests__/event-action/drawer.test.tsx @@ -1,6 +1,6 @@ import {fireEvent, render, waitFor} from '@testing-library/react'; -import '../../src/themes/default'; -import {render as amisRender} from '../../src/index'; +import '../../src'; +import {render as amisRender} from '../../src'; import {makeEnv, wait} from '../helper'; test('EventAction:drawer', async () => { diff --git a/packages/amis/__tests__/event-action/email.test.tsx b/packages/amis/__tests__/event-action/email.test.tsx index f4fc8dbd3..e51d92a4e 100644 --- a/packages/amis/__tests__/event-action/email.test.tsx +++ b/packages/amis/__tests__/event-action/email.test.tsx @@ -1,6 +1,6 @@ import {fireEvent, render, waitFor} from '@testing-library/react'; -import '../../src/themes/default'; -import {render as amisRender} from '../../src/index'; +import '../../src'; +import {render as amisRender} from '../../src'; import {makeEnv} from '../helper'; test('EventAction:email', async () => { diff --git a/packages/amis/__tests__/event-action/hidden.test.tsx b/packages/amis/__tests__/event-action/hidden.test.tsx index 083e93f2e..6dc685808 100644 --- a/packages/amis/__tests__/event-action/hidden.test.tsx +++ b/packages/amis/__tests__/event-action/hidden.test.tsx @@ -1,6 +1,6 @@ import {fireEvent, render} from '@testing-library/react'; -import '../../src/themes/default'; -import {render as amisRender} from '../../src/index'; +import '../../src'; +import {render as amisRender} from '../../src'; import {makeEnv} from '../helper'; test('EventAction:hidden', async () => { diff --git a/packages/amis/__tests__/event-action/prevent.test.tsx b/packages/amis/__tests__/event-action/prevent.test.tsx index d45e0f9f1..6c55f63bc 100644 --- a/packages/amis/__tests__/event-action/prevent.test.tsx +++ b/packages/amis/__tests__/event-action/prevent.test.tsx @@ -1,6 +1,6 @@ import {fireEvent, render, waitFor} from '@testing-library/react'; -import '../../src/themes/default'; -import {render as amisRender} from '../../src/index'; +import '../../src'; +import {render as amisRender} from '../../src'; import {makeEnv} from '../helper'; test('EventAction:prevent', async () => { diff --git a/packages/amis/__tests__/event-action/renderers/action.test.tsx b/packages/amis/__tests__/event-action/renderers/action.test.tsx index 408db4901..964d0ae0a 100644 --- a/packages/amis/__tests__/event-action/renderers/action.test.tsx +++ b/packages/amis/__tests__/event-action/renderers/action.test.tsx @@ -1,6 +1,6 @@ import {fireEvent, render, waitFor} from '@testing-library/react'; -import '../../../src/themes/default'; -import {render as amisRender} from '../../../src/index'; +import '../../../src'; +import {render as amisRender} from '../../../src'; import {makeEnv} from '../../helper'; test('EventAction:action', async () => { diff --git a/packages/amis/__tests__/event-action/toast.test.tsx b/packages/amis/__tests__/event-action/toast.test.tsx index ae8364c70..6401e559e 100644 --- a/packages/amis/__tests__/event-action/toast.test.tsx +++ b/packages/amis/__tests__/event-action/toast.test.tsx @@ -1,6 +1,6 @@ import {fireEvent, render, waitFor} from '@testing-library/react'; -import '../../src/themes/default'; -import {render as amisRender} from '../../src/index'; +import '../../src'; +import {render as amisRender} from '../../src'; import {makeEnv} from '../helper'; test('EventAction:toast', async () => { diff --git a/packages/amis/__tests__/event-action/url.test.tsx b/packages/amis/__tests__/event-action/url.test.tsx index 440dfcf21..fcb4cb9b6 100644 --- a/packages/amis/__tests__/event-action/url.test.tsx +++ b/packages/amis/__tests__/event-action/url.test.tsx @@ -1,6 +1,6 @@ import {fireEvent, render, waitFor} from '@testing-library/react'; -import '../../src/themes/default'; -import {render as amisRender} from '../../src/index'; +import '../../src'; +import {render as amisRender} from '../../src'; import {makeEnv} from '../helper'; test('EventAction:url & link', async () => { diff --git a/packages/amis/__tests__/helper.tsx b/packages/amis/__tests__/helper.tsx index d11689f62..38d0dfed7 100644 --- a/packages/amis/__tests__/helper.tsx +++ b/packages/amis/__tests__/helper.tsx @@ -1,5 +1,5 @@ import {waitFor} from '@testing-library/react'; -import {RenderOptions} from '../src/factory'; +import {RenderOptions} from '../src'; // jest.useFakeTimers 会修改 global 的 setTimeout 所以需要把原始的记录下来。 const timerFn = (global as any).originSetTimeout || setTimeout; diff --git a/packages/amis/__tests__/renderers/Action.test.tsx b/packages/amis/__tests__/renderers/Action.test.tsx index df00775e7..9021ed399 100644 --- a/packages/amis/__tests__/renderers/Action.test.tsx +++ b/packages/amis/__tests__/renderers/Action.test.tsx @@ -8,9 +8,9 @@ import { screen, waitFor } from '@testing-library/react'; -import {render as amisRender} from '../../src/index'; +import {render as amisRender} from '../../src'; import {makeEnv, wait} from '../helper'; -import '../../src/themes/default'; +import '../../src'; afterEach(cleanup); diff --git a/packages/amis/__tests__/renderers/Alert.test.tsx b/packages/amis/__tests__/renderers/Alert.test.tsx index a4324a86f..af7fd89bd 100644 --- a/packages/amis/__tests__/renderers/Alert.test.tsx +++ b/packages/amis/__tests__/renderers/Alert.test.tsx @@ -1,7 +1,7 @@ import React = require('react'); import {render} from '@testing-library/react'; -import '../../src/themes/default'; -import {render as amisRender} from '../../src/index'; +import '../../src'; +import {render as amisRender} from '../../src'; import {makeEnv} from '../helper'; test('Renderer:alert', () => { diff --git a/packages/amis/__tests__/renderers/AnchorNav.test.tsx b/packages/amis/__tests__/renderers/AnchorNav.test.tsx index 61fc37e5e..a62fa5484 100644 --- a/packages/amis/__tests__/renderers/AnchorNav.test.tsx +++ b/packages/amis/__tests__/renderers/AnchorNav.test.tsx @@ -1,7 +1,7 @@ import React = require('react'); import {render} from '@testing-library/react'; -import '../../src/themes/default'; -import {render as amisRender} from '../../src/index'; +import '../../src'; +import {render as amisRender} from '../../src'; import {makeEnv} from '../helper'; test('Renderer:anchorNav', () => { diff --git a/packages/amis/__tests__/renderers/Avatar.test.tsx b/packages/amis/__tests__/renderers/Avatar.test.tsx index bcbed5c52..3d5132439 100644 --- a/packages/amis/__tests__/renderers/Avatar.test.tsx +++ b/packages/amis/__tests__/renderers/Avatar.test.tsx @@ -1,7 +1,7 @@ import React = require('react'); import {render} from '@testing-library/react'; -import '../../src/themes/default'; -import {render as amisRender} from '../../src/index'; +import '../../src'; +import {render as amisRender} from '../../src'; import {makeEnv} from '../helper'; test('Renderer:avatar test', () => { diff --git a/packages/amis/__tests__/renderers/BarCode.test.tsx b/packages/amis/__tests__/renderers/BarCode.test.tsx index 6eb8e8fb5..898dc218f 100644 --- a/packages/amis/__tests__/renderers/BarCode.test.tsx +++ b/packages/amis/__tests__/renderers/BarCode.test.tsx @@ -1,7 +1,7 @@ import React = require('react'); import {render, fireEvent, waitFor} from '@testing-library/react'; -import '../../src/themes/default'; -import {render as amisRender} from '../../src/index'; +import '../../src'; +import {render as amisRender} from '../../src'; import {makeEnv, wait} from '../helper'; import 'jest-canvas-mock'; @@ -19,7 +19,9 @@ test('Renderer:bar-code', async () => { makeEnv({}) ) ); - await waitFor(() => expect(container.querySelector('.cxd-BarCode')).toBeInTheDocument()); + await waitFor(() => + expect(container.querySelector('.cxd-BarCode')).toBeInTheDocument() + ); expect(container).toMatchSnapshot(); }); diff --git a/packages/amis/__tests__/renderers/Breadcrumb.test.tsx b/packages/amis/__tests__/renderers/Breadcrumb.test.tsx index b42595fdd..5566da562 100644 --- a/packages/amis/__tests__/renderers/Breadcrumb.test.tsx +++ b/packages/amis/__tests__/renderers/Breadcrumb.test.tsx @@ -1,7 +1,7 @@ import React = require('react'); import {fireEvent, render, screen} from '@testing-library/react'; -import '../../src/themes/default'; -import {render as amisRender} from '../../src/index'; +import '../../src'; +import {render as amisRender} from '../../src'; import {makeEnv} from '../helper'; import * as renderer from 'react-test-renderer'; diff --git a/packages/amis/__tests__/renderers/ButtonToolbar.test.tsx b/packages/amis/__tests__/renderers/ButtonToolbar.test.tsx index dd1e2e05b..3a1667d6f 100644 --- a/packages/amis/__tests__/renderers/ButtonToolbar.test.tsx +++ b/packages/amis/__tests__/renderers/ButtonToolbar.test.tsx @@ -1,7 +1,7 @@ import React = require('react'); import {render} from '@testing-library/react'; -import '../../src/themes/default'; -import {render as amisRender} from '../../src/index'; +import '../../src'; +import {render as amisRender} from '../../src'; import {makeEnv} from '../helper'; test('Renderer:button-toolbar', async () => { diff --git a/packages/amis/__tests__/renderers/CRUD.test.tsx b/packages/amis/__tests__/renderers/CRUD.test.tsx index f6507375d..372cedd29 100644 --- a/packages/amis/__tests__/renderers/CRUD.test.tsx +++ b/packages/amis/__tests__/renderers/CRUD.test.tsx @@ -1,7 +1,7 @@ import React = require('react'); import {render, waitFor} from '@testing-library/react'; -import '../../src/themes/default'; -import {render as amisRender} from '../../src/index'; +import '../../src'; +import {render as amisRender} from '../../src'; import {makeEnv, wait} from '../helper'; import rows from '../mockData/rows'; diff --git a/packages/amis/__tests__/renderers/Card.test.tsx b/packages/amis/__tests__/renderers/Card.test.tsx index 49b6b6b20..da2732195 100644 --- a/packages/amis/__tests__/renderers/Card.test.tsx +++ b/packages/amis/__tests__/renderers/Card.test.tsx @@ -1,8 +1,8 @@ import React = require('react'); import {render} from '@testing-library/react'; import * as renderer from 'react-test-renderer'; -import '../../src/themes/default'; -import {render as amisRender} from '../../src/index'; +import '../../src'; +import {render as amisRender} from '../../src'; import {makeEnv} from '../helper'; test('Renderer:card', () => { diff --git a/packages/amis/__tests__/renderers/Carousel.test.tsx b/packages/amis/__tests__/renderers/Carousel.test.tsx index 94bff4efe..f2ea41f49 100644 --- a/packages/amis/__tests__/renderers/Carousel.test.tsx +++ b/packages/amis/__tests__/renderers/Carousel.test.tsx @@ -1,7 +1,7 @@ import React = require('react'); import {render, fireEvent, waitFor} from '@testing-library/react'; -import '../../src/themes/default'; -import {render as amisRender} from '../../src/index'; +import '../../src'; +import {render as amisRender} from '../../src'; import {makeEnv, wait} from '../helper'; test('Renderer:carousel', async () => { diff --git a/packages/amis/__tests__/renderers/Container.test.tsx b/packages/amis/__tests__/renderers/Container.test.tsx index 224126c20..14b64e737 100644 --- a/packages/amis/__tests__/renderers/Container.test.tsx +++ b/packages/amis/__tests__/renderers/Container.test.tsx @@ -1,7 +1,7 @@ import React = require('react'); import {render} from '@testing-library/react'; -import '../../src/themes/default'; -import {render as amisRender} from '../../src/index'; +import '../../src'; +import {render as amisRender} from '../../src'; import {makeEnv} from '../helper'; test('Renderer:container', () => { diff --git a/packages/amis/__tests__/renderers/Custom.test.tsx b/packages/amis/__tests__/renderers/Custom.test.tsx index 85be2fc84..5979e4433 100644 --- a/packages/amis/__tests__/renderers/Custom.test.tsx +++ b/packages/amis/__tests__/renderers/Custom.test.tsx @@ -1,7 +1,7 @@ import React = require('react'); import {render} from '@testing-library/react'; -import '../../src/themes/default'; -import {render as amisRender} from '../../src/index'; +import '../../src'; +import {render as amisRender} from '../../src'; import {makeEnv} from '../helper'; test('Renderer:custom', () => { diff --git a/packages/amis/__tests__/renderers/Date.test.tsx b/packages/amis/__tests__/renderers/Date.test.tsx index 811989868..4549df058 100644 --- a/packages/amis/__tests__/renderers/Date.test.tsx +++ b/packages/amis/__tests__/renderers/Date.test.tsx @@ -1,7 +1,7 @@ import React = require('react'); import {render} from '@testing-library/react'; -import '../../src/themes/default'; -import {render as amisRender} from '../../src/index'; +import '../../src'; +import {render as amisRender} from '../../src'; import {makeEnv} from '../helper'; import moment from 'moment'; diff --git a/packages/amis/__tests__/renderers/DropDownButton.test.tsx b/packages/amis/__tests__/renderers/DropDownButton.test.tsx index 73ef4604b..217ca52b1 100644 --- a/packages/amis/__tests__/renderers/DropDownButton.test.tsx +++ b/packages/amis/__tests__/renderers/DropDownButton.test.tsx @@ -1,7 +1,7 @@ import React = require('react'); import {render, fireEvent} from '@testing-library/react'; -import '../../src/themes/default'; -import {render as amisRender} from '../../src/index'; +import '../../src'; +import {render as amisRender} from '../../src'; import {makeEnv} from '../helper'; test('Renderer:dropdown-button', async () => { diff --git a/packages/amis/__tests__/renderers/Each.test.tsx b/packages/amis/__tests__/renderers/Each.test.tsx index dbf473c9d..68855aca6 100644 --- a/packages/amis/__tests__/renderers/Each.test.tsx +++ b/packages/amis/__tests__/renderers/Each.test.tsx @@ -1,7 +1,7 @@ import React = require('react'); import {render} from '@testing-library/react'; -import '../../src/themes/default'; -import {render as amisRender} from '../../src/index'; +import '../../src'; +import {render as amisRender} from '../../src'; import {makeEnv} from '../helper'; test('Renderer:each', async () => { diff --git a/packages/amis/__tests__/renderers/Flex.test.tsx b/packages/amis/__tests__/renderers/Flex.test.tsx index ff41d9fbe..a583c4dc8 100644 --- a/packages/amis/__tests__/renderers/Flex.test.tsx +++ b/packages/amis/__tests__/renderers/Flex.test.tsx @@ -1,7 +1,7 @@ import React = require('react'); import {render} from '@testing-library/react'; -import '../../src/themes/default'; -import {render as amisRender} from '../../src/index'; +import '../../src'; +import {render as amisRender} from '../../src'; import {makeEnv} from '../helper'; test('Renderer:flex', () => { diff --git a/packages/amis/__tests__/renderers/Form/array.test.tsx b/packages/amis/__tests__/renderers/Form/array.test.tsx index 75f5a41e7..962c17b8f 100644 --- a/packages/amis/__tests__/renderers/Form/array.test.tsx +++ b/packages/amis/__tests__/renderers/Form/array.test.tsx @@ -1,9 +1,9 @@ import React = require('react'); import {render, cleanup} from '@testing-library/react'; -import '../../../src/themes/default'; -import {render as amisRender} from '../../../src/index'; +import '../../../src'; +import {render as amisRender} from '../../../src'; import {makeEnv} from '../../helper'; -import {clearStoresCache} from '../../../src/factory'; +import {clearStoresCache} from 'amis'; afterEach(() => { cleanup(); diff --git a/packages/amis/__tests__/renderers/Form/autoFill.test.tsx b/packages/amis/__tests__/renderers/Form/autoFill.test.tsx index 58f421a59..4d8b6dbe1 100644 --- a/packages/amis/__tests__/renderers/Form/autoFill.test.tsx +++ b/packages/amis/__tests__/renderers/Form/autoFill.test.tsx @@ -1,9 +1,9 @@ import React = require('react'); import {render, cleanup, fireEvent, waitFor} from '@testing-library/react'; -import '../../../src/themes/default'; -import {render as amisRender} from '../../../src/index'; +import '../../../src'; +import {render as amisRender} from '../../../src'; import {makeEnv, wait} from '../../helper'; -import {clearStoresCache} from '../../../src/factory'; +import {clearStoresCache} from 'amis'; afterEach(() => { cleanup(); diff --git a/packages/amis/__tests__/renderers/Form/button.test.tsx b/packages/amis/__tests__/renderers/Form/button.test.tsx index 60ad749de..840f07a6b 100644 --- a/packages/amis/__tests__/renderers/Form/button.test.tsx +++ b/packages/amis/__tests__/renderers/Form/button.test.tsx @@ -1,9 +1,9 @@ import React = require('react'); import {render, cleanup, fireEvent} from '@testing-library/react'; -import '../../../src/themes/default'; -import {render as amisRender} from '../../../src/index'; +import '../../../src'; +import {render as amisRender} from '../../../src'; import {wait, makeEnv} from '../../helper'; -import {clearStoresCache} from '../../../src/factory'; +import {clearStoresCache} from 'amis'; afterEach(() => { cleanup(); diff --git a/packages/amis/__tests__/renderers/Form/buttonGroup.test.tsx b/packages/amis/__tests__/renderers/Form/buttonGroup.test.tsx index c00d19f6b..7a4a4afdc 100644 --- a/packages/amis/__tests__/renderers/Form/buttonGroup.test.tsx +++ b/packages/amis/__tests__/renderers/Form/buttonGroup.test.tsx @@ -1,9 +1,9 @@ import React = require('react'); import {render, cleanup, fireEvent, waitFor} from '@testing-library/react'; -import '../../../src/themes/default'; -import {render as amisRender} from '../../../src/index'; +import '../../../src'; +import {render as amisRender} from '../../../src'; import {makeEnv, wait} from '../../helper'; -import {clearStoresCache} from '../../../src/factory'; +import {clearStoresCache} from 'amis'; afterEach(() => { cleanup(); diff --git a/packages/amis/__tests__/renderers/Form/buttonToolBar.test.tsx b/packages/amis/__tests__/renderers/Form/buttonToolBar.test.tsx index 957361036..697fdd850 100644 --- a/packages/amis/__tests__/renderers/Form/buttonToolBar.test.tsx +++ b/packages/amis/__tests__/renderers/Form/buttonToolBar.test.tsx @@ -1,9 +1,9 @@ import React = require('react'); import {render, cleanup, fireEvent} from '@testing-library/react'; -import '../../../src/themes/default'; -import {render as amisRender} from '../../../src/index'; +import '../../../src'; +import {render as amisRender} from '../../../src'; import {makeEnv, wait} from '../../helper'; -import {clearStoresCache} from '../../../src/factory'; +import {clearStoresCache} from 'amis'; afterEach(() => { cleanup(); diff --git a/packages/amis/__tests__/renderers/Form/chainedSelect.test.tsx b/packages/amis/__tests__/renderers/Form/chainedSelect.test.tsx index 33a2a1e07..1db020a42 100644 --- a/packages/amis/__tests__/renderers/Form/chainedSelect.test.tsx +++ b/packages/amis/__tests__/renderers/Form/chainedSelect.test.tsx @@ -1,7 +1,7 @@ import React = require('react'); import {render, waitForElementToBeRemoved} from '@testing-library/react'; -import '../../../src/themes/default'; -import {render as amisRender} from '../../../src/index'; +import '../../../src'; +import {render as amisRender} from '../../../src'; import {makeEnv, wait} from '../../helper'; test('Renderer:chained-select', async () => { diff --git a/packages/amis/__tests__/renderers/Form/checkbox.test.tsx b/packages/amis/__tests__/renderers/Form/checkbox.test.tsx index 75a41f3c3..b78227e5f 100644 --- a/packages/amis/__tests__/renderers/Form/checkbox.test.tsx +++ b/packages/amis/__tests__/renderers/Form/checkbox.test.tsx @@ -1,9 +1,9 @@ import React = require('react'); import {render, cleanup, fireEvent} from '@testing-library/react'; -import '../../../src/themes/default'; -import {render as amisRender} from '../../../src/index'; +import '../../../src'; +import {render as amisRender} from '../../../src'; import {makeEnv} from '../../helper'; -import {clearStoresCache} from '../../../src/factory'; +import {clearStoresCache} from 'amis'; afterEach(() => { cleanup(); diff --git a/packages/amis/__tests__/renderers/Form/checkboxes.test.tsx b/packages/amis/__tests__/renderers/Form/checkboxes.test.tsx index 5c602af4c..ade41bb6a 100644 --- a/packages/amis/__tests__/renderers/Form/checkboxes.test.tsx +++ b/packages/amis/__tests__/renderers/Form/checkboxes.test.tsx @@ -1,9 +1,9 @@ import React = require('react'); import {render, cleanup, fireEvent} from '@testing-library/react'; -import '../../../src/themes/default'; -import {render as amisRender} from '../../../src/index'; +import '../../../src'; +import {render as amisRender} from '../../../src'; import {makeEnv, wait} from '../../helper'; -import {clearStoresCache} from '../../../src/factory'; +import {clearStoresCache} from 'amis'; afterEach(() => { cleanup(); diff --git a/packages/amis/__tests__/renderers/Form/city.test.tsx b/packages/amis/__tests__/renderers/Form/city.test.tsx index 302e77426..2be1df53a 100644 --- a/packages/amis/__tests__/renderers/Form/city.test.tsx +++ b/packages/amis/__tests__/renderers/Form/city.test.tsx @@ -1,7 +1,7 @@ import React = require('react'); import {render, fireEvent, waitFor} from '@testing-library/react'; -import '../../../src/themes/default'; -import {render as amisRender} from '../../../src/index'; +import '../../../src'; +import {render as amisRender} from '../../../src'; import {makeEnv, wait} from '../../helper'; test('Renderer:city', async () => { diff --git a/packages/amis/__tests__/renderers/Form/color.test.tsx b/packages/amis/__tests__/renderers/Form/color.test.tsx index 5432a02b5..37f36dbd9 100644 --- a/packages/amis/__tests__/renderers/Form/color.test.tsx +++ b/packages/amis/__tests__/renderers/Form/color.test.tsx @@ -1,7 +1,7 @@ import React = require('react'); import {render, fireEvent} from '@testing-library/react'; -import '../../../src/themes/default'; -import {render as amisRender} from '../../../src/index'; +import '../../../src'; +import {render as amisRender} from '../../../src'; import {makeEnv} from '../../helper'; test('Renderer:color', async () => { diff --git a/packages/amis/__tests__/renderers/Form/combo.test.tsx b/packages/amis/__tests__/renderers/Form/combo.test.tsx index f2b0ed11c..e393ebf1f 100644 --- a/packages/amis/__tests__/renderers/Form/combo.test.tsx +++ b/packages/amis/__tests__/renderers/Form/combo.test.tsx @@ -6,8 +6,8 @@ import { waitFor, act } from '@testing-library/react'; -import '../../../src/themes/default'; -import {render as amisRender} from '../../../src/index'; +import '../../../src'; +import {render as amisRender} from '../../../src'; import {makeEnv, wait} from '../../helper'; test('Renderer:combo', () => { diff --git a/packages/amis/__tests__/renderers/Form/conditionBuilder.test.tsx b/packages/amis/__tests__/renderers/Form/conditionBuilder.test.tsx index f2bec4309..0908476d8 100644 --- a/packages/amis/__tests__/renderers/Form/conditionBuilder.test.tsx +++ b/packages/amis/__tests__/renderers/Form/conditionBuilder.test.tsx @@ -1,7 +1,7 @@ import React = require('react'); import {fireEvent, render, screen} from '@testing-library/react'; -import '../../../src/themes/default'; -import {render as amisRender} from '../../../src/index'; +import '../../../src'; +import {render as amisRender} from '../../../src'; import {makeEnv, wait} from '../../helper'; const testSchema = { diff --git a/packages/amis/__tests__/renderers/Form/container.test.tsx b/packages/amis/__tests__/renderers/Form/container.test.tsx index 483690bfa..738d9df89 100644 --- a/packages/amis/__tests__/renderers/Form/container.test.tsx +++ b/packages/amis/__tests__/renderers/Form/container.test.tsx @@ -1,7 +1,7 @@ import React = require('react'); import {render, fireEvent} from '@testing-library/react'; -import '../../../src/themes/default'; -import {render as amisRender} from '../../../src/index'; +import '../../../src'; +import {render as amisRender} from '../../../src'; import {makeEnv} from '../../helper'; test('Renderer:container', async () => { diff --git a/packages/amis/__tests__/renderers/Form/control.test.tsx b/packages/amis/__tests__/renderers/Form/control.test.tsx index 079bea0d9..56a773bb0 100644 --- a/packages/amis/__tests__/renderers/Form/control.test.tsx +++ b/packages/amis/__tests__/renderers/Form/control.test.tsx @@ -1,9 +1,9 @@ import React = require('react'); import {render, cleanup, fireEvent, waitFor} from '@testing-library/react'; -import '../../../src/themes/default'; -import {render as amisRender} from '../../../src/index'; +import '../../../src'; +import {render as amisRender} from '../../../src'; import {makeEnv, wait} from '../../helper'; -import {clearStoresCache} from '../../../src/factory'; +import {clearStoresCache} from 'amis'; afterEach(() => { cleanup(); diff --git a/packages/amis/__tests__/renderers/Form/dateRange.test.tsx b/packages/amis/__tests__/renderers/Form/dateRange.test.tsx index 3cc03ad63..e4372a650 100644 --- a/packages/amis/__tests__/renderers/Form/dateRange.test.tsx +++ b/packages/amis/__tests__/renderers/Form/dateRange.test.tsx @@ -2,8 +2,8 @@ import React = require('react'); import PageRenderer from '../../../../amis-core/src/renderers/Form'; import * as renderer from 'react-test-renderer'; import {render, fireEvent, cleanup, getByText} from '@testing-library/react'; -import '../../../src/themes/default'; -import {render as amisRender} from '../../../src/index'; +import '../../../src'; +import {render as amisRender} from '../../../src'; import {makeEnv} from '../../helper'; import moment from 'moment'; diff --git a/packages/amis/__tests__/renderers/Form/datetime.test.tsx b/packages/amis/__tests__/renderers/Form/datetime.test.tsx index 67f1a49ad..92b8bef7d 100644 --- a/packages/amis/__tests__/renderers/Form/datetime.test.tsx +++ b/packages/amis/__tests__/renderers/Form/datetime.test.tsx @@ -2,8 +2,8 @@ import React = require('react'); import PageRenderer from '../../../../amis-core/src/renderers/Form'; import * as renderer from 'react-test-renderer'; import {render, fireEvent, cleanup, getByText} from '@testing-library/react'; -import '../../../src/themes/default'; -import {render as amisRender} from '../../../src/index'; +import '../../../src'; +import {render as amisRender} from '../../../src'; import {makeEnv} from '../../helper'; import moment from 'moment'; diff --git a/packages/amis/__tests__/renderers/Form/fieldSet.test.tsx b/packages/amis/__tests__/renderers/Form/fieldSet.test.tsx index d6b7c5d5b..86137b8aa 100644 --- a/packages/amis/__tests__/renderers/Form/fieldSet.test.tsx +++ b/packages/amis/__tests__/renderers/Form/fieldSet.test.tsx @@ -1,7 +1,7 @@ import React = require('react'); import {render, fireEvent} from '@testing-library/react'; -import '../../../src/themes/default'; -import {render as amisRender} from '../../../src/index'; +import '../../../src'; +import {render as amisRender} from '../../../src'; import {makeEnv} from '../../helper'; test('Renderer:fieldSet', async () => { diff --git a/packages/amis/__tests__/renderers/Form/formitem.test.tsx b/packages/amis/__tests__/renderers/Form/formitem.test.tsx index 30b739831..8c6f73f67 100644 --- a/packages/amis/__tests__/renderers/Form/formitem.test.tsx +++ b/packages/amis/__tests__/renderers/Form/formitem.test.tsx @@ -1,9 +1,9 @@ import React = require('react'); import {render, fireEvent, cleanup} from '@testing-library/react'; -import '../../../src/themes/default'; -import {render as amisRender} from '../../../src/index'; +import '../../../src'; +import {render as amisRender} from '../../../src'; import {wait, makeEnv} from '../../helper'; -import {clearStoresCache} from '../../../src/factory'; +import {clearStoresCache} from 'amis'; afterEach(() => { cleanup(); diff --git a/packages/amis/__tests__/renderers/Form/formula.test.tsx b/packages/amis/__tests__/renderers/Form/formula.test.tsx index 128e592a7..640cd496d 100644 --- a/packages/amis/__tests__/renderers/Form/formula.test.tsx +++ b/packages/amis/__tests__/renderers/Form/formula.test.tsx @@ -1,7 +1,7 @@ import React = require('react'); import {render, fireEvent, waitFor} from '@testing-library/react'; -import '../../../src/themes/default'; -import {render as amisRender} from '../../../src/index'; +import '../../../src'; +import {render as amisRender} from '../../../src'; import {makeEnv, wait} from '../../helper'; test('Renderer:formula', async () => { diff --git a/packages/amis/__tests__/renderers/Form/grid.test.tsx b/packages/amis/__tests__/renderers/Form/grid.test.tsx index 866dbc993..7e371187a 100644 --- a/packages/amis/__tests__/renderers/Form/grid.test.tsx +++ b/packages/amis/__tests__/renderers/Form/grid.test.tsx @@ -1,9 +1,9 @@ import React = require('react'); import {render, cleanup} from '@testing-library/react'; -import '../../../src/themes/default'; -import {render as amisRender} from '../../../src/index'; +import '../../../src'; +import {render as amisRender} from '../../../src'; import {makeEnv} from '../../helper'; -import {clearStoresCache} from '../../../src/factory'; +import {clearStoresCache} from 'amis'; afterEach(() => { cleanup(); diff --git a/packages/amis/__tests__/renderers/Form/group.test.tsx b/packages/amis/__tests__/renderers/Form/group.test.tsx index d56df49ff..e847d2f6f 100644 --- a/packages/amis/__tests__/renderers/Form/group.test.tsx +++ b/packages/amis/__tests__/renderers/Form/group.test.tsx @@ -1,9 +1,9 @@ import React = require('react'); import {render, cleanup} from '@testing-library/react'; -import '../../../src/themes/default'; -import {render as amisRender} from '../../../src/index'; +import '../../../src'; +import {render as amisRender} from '../../../src'; import {makeEnv} from '../../helper'; -import {clearStoresCache} from '../../../src/factory'; +import {clearStoresCache} from 'amis'; afterEach(() => { cleanup(); diff --git a/packages/amis/__tests__/renderers/Form/hbox.test.tsx b/packages/amis/__tests__/renderers/Form/hbox.test.tsx index e0a1d8ad4..f2b52b84b 100644 --- a/packages/amis/__tests__/renderers/Form/hbox.test.tsx +++ b/packages/amis/__tests__/renderers/Form/hbox.test.tsx @@ -1,9 +1,9 @@ import React = require('react'); import {render, cleanup} from '@testing-library/react'; -import '../../../src/themes/default'; -import {render as amisRender} from '../../../src/index'; +import '../../../src'; +import {render as amisRender} from '../../../src'; import {makeEnv} from '../../helper'; -import {clearStoresCache} from '../../../src/factory'; +import {clearStoresCache} from 'amis'; afterEach(() => { cleanup(); diff --git a/packages/amis/__tests__/renderers/Form/iconPicker.test.tsx b/packages/amis/__tests__/renderers/Form/iconPicker.test.tsx index f779e3d9c..087a77675 100644 --- a/packages/amis/__tests__/renderers/Form/iconPicker.test.tsx +++ b/packages/amis/__tests__/renderers/Form/iconPicker.test.tsx @@ -1,7 +1,7 @@ import React = require('react'); import {fireEvent, render} from '@testing-library/react'; -import '../../../src/themes/default'; -import {render as amisRender, setIconVendor} from '../../../src/index'; +import '../../../src'; +import {render as amisRender, setIconVendor} from '../../../src'; import {makeEnv, wait} from '../../helper'; test('Renderer:icon-picker', async () => { diff --git a/packages/amis/__tests__/renderers/Form/index.test.tsx b/packages/amis/__tests__/renderers/Form/index.test.tsx index 2eb98dabf..b81bd7d95 100644 --- a/packages/amis/__tests__/renderers/Form/index.test.tsx +++ b/packages/amis/__tests__/renderers/Form/index.test.tsx @@ -8,10 +8,10 @@ import { getByText, waitFor } from '@testing-library/react'; -import '../../../src/themes/default'; -import {render as amisRender} from '../../../src/index'; +import '../../../src'; +import {render as amisRender} from '../../../src'; import {wait, makeEnv} from '../../helper'; -import {clearStoresCache} from '../../../src/factory'; +import {clearStoresCache} from 'amis'; import {createMemoryHistory} from 'history'; // mock getComputedStyle diff --git a/packages/amis/__tests__/renderers/Form/initData.test.tsx b/packages/amis/__tests__/renderers/Form/initData.test.tsx index 7a8135263..2a77e7816 100644 --- a/packages/amis/__tests__/renderers/Form/initData.test.tsx +++ b/packages/amis/__tests__/renderers/Form/initData.test.tsx @@ -1,9 +1,9 @@ import React = require('react'); import {render, cleanup, fireEvent, waitFor} from '@testing-library/react'; -import '../../../src/themes/default'; -import {render as amisRender} from '../../../src/index'; +import '../../../src'; +import {render as amisRender} from '../../../src'; import {makeEnv, wait} from '../../helper'; -import {clearStoresCache} from '../../../src/factory'; +import {clearStoresCache} from 'amis'; afterEach(() => { cleanup(); @@ -180,7 +180,7 @@ test('Form:initData:remote', async () => { { type: 'text', name: 'a', - label: 'Label', + label: 'Label' }, { type: 'text', diff --git a/packages/amis/__tests__/renderers/Form/inputArray.test.tsx b/packages/amis/__tests__/renderers/Form/inputArray.test.tsx index 4ef4f7afd..c1213a385 100644 --- a/packages/amis/__tests__/renderers/Form/inputArray.test.tsx +++ b/packages/amis/__tests__/renderers/Form/inputArray.test.tsx @@ -1,7 +1,7 @@ import React = require('react'); import {render, fireEvent, cleanup, screen} from '@testing-library/react'; -import '../../../src/themes/default'; -import {render as amisRender} from '../../../src/index'; +import '../../../src'; +import {render as amisRender} from '../../../src'; import {makeEnv, wait} from '../../helper'; test('Renderer:inputArray', async () => { diff --git a/packages/amis/__tests__/renderers/Form/inputDate.test.tsx b/packages/amis/__tests__/renderers/Form/inputDate.test.tsx index b2ec63ff4..50d66af28 100644 --- a/packages/amis/__tests__/renderers/Form/inputDate.test.tsx +++ b/packages/amis/__tests__/renderers/Form/inputDate.test.tsx @@ -2,8 +2,8 @@ import React = require('react'); import PageRenderer from '../../../../amis-core/src/renderers/Form'; import * as renderer from 'react-test-renderer'; import {render, fireEvent, cleanup, getByText} from '@testing-library/react'; -import '../../../src/themes/default'; -import {render as amisRender} from '../../../src/index'; +import '../../../src'; +import {render as amisRender} from '../../../src'; import {makeEnv} from '../../helper'; import moment from 'moment'; diff --git a/packages/amis/__tests__/renderers/Form/inputFormula.test.tsx b/packages/amis/__tests__/renderers/Form/inputFormula.test.tsx index 0ca83c43e..702b5e9ce 100644 --- a/packages/amis/__tests__/renderers/Form/inputFormula.test.tsx +++ b/packages/amis/__tests__/renderers/Form/inputFormula.test.tsx @@ -1,7 +1,7 @@ import React = require('react'); import {fireEvent, render, screen} from '@testing-library/react'; -import '../../../src/themes/default'; -import {render as amisRender} from '../../../src/index'; +import '../../../src'; +import {render as amisRender} from '../../../src'; import {makeEnv} from '../../helper'; test('Renderer:input-formula', async () => { diff --git a/packages/amis/__tests__/renderers/Form/inputGroup.test.tsx b/packages/amis/__tests__/renderers/Form/inputGroup.test.tsx index f45b599b0..985bbb54f 100644 --- a/packages/amis/__tests__/renderers/Form/inputGroup.test.tsx +++ b/packages/amis/__tests__/renderers/Form/inputGroup.test.tsx @@ -1,7 +1,7 @@ import React = require('react'); import {render, fireEvent} from '@testing-library/react'; -import '../../../src/themes/default'; -import {render as amisRender} from '../../../src/index'; +import '../../../src'; +import {render as amisRender} from '../../../src'; import {makeEnv} from '../../helper'; test('Renderer:fieldSet', async () => { diff --git a/packages/amis/__tests__/renderers/Form/inputMonth.test.tsx b/packages/amis/__tests__/renderers/Form/inputMonth.test.tsx index e90ae3e01..af628e6aa 100644 --- a/packages/amis/__tests__/renderers/Form/inputMonth.test.tsx +++ b/packages/amis/__tests__/renderers/Form/inputMonth.test.tsx @@ -2,8 +2,8 @@ import React = require('react'); import PageRenderer from '../../../../amis-core/src/renderers/Form'; import * as renderer from 'react-test-renderer'; import {render, fireEvent, waitFor, getByText} from '@testing-library/react'; -import '../../../src/themes/default'; -import {render as amisRender} from '../../../src/index'; +import '../../../src'; +import {render as amisRender} from '../../../src'; import {makeEnv} from '../../helper'; import moment from 'moment'; diff --git a/packages/amis/__tests__/renderers/Form/inputMonthRange.test.tsx b/packages/amis/__tests__/renderers/Form/inputMonthRange.test.tsx index f0803e75e..15d2b1231 100644 --- a/packages/amis/__tests__/renderers/Form/inputMonthRange.test.tsx +++ b/packages/amis/__tests__/renderers/Form/inputMonthRange.test.tsx @@ -1,7 +1,7 @@ import React = require('react'); import {render, fireEvent, within, cleanup} from '@testing-library/react'; -import '../../../src/themes/default'; -import {render as amisRender} from '../../../src/index'; +import '../../../src'; +import {render as amisRender} from '../../../src'; import {makeEnv} from '../../helper'; import moment from 'moment'; diff --git a/packages/amis/__tests__/renderers/Form/inputTable.test.tsx b/packages/amis/__tests__/renderers/Form/inputTable.test.tsx index 984a2f3ef..386b626cd 100644 --- a/packages/amis/__tests__/renderers/Form/inputTable.test.tsx +++ b/packages/amis/__tests__/renderers/Form/inputTable.test.tsx @@ -1,7 +1,7 @@ import React = require('react'); import {render, screen, fireEvent} from '@testing-library/react'; -import '../../../src/themes/default'; -import {render as amisRender} from '../../../src/index'; +import '../../../src'; +import {render as amisRender} from '../../../src'; import {makeEnv} from '../../helper'; test('Renderer:input table', () => { diff --git a/packages/amis/__tests__/renderers/Form/inputYear.test.tsx b/packages/amis/__tests__/renderers/Form/inputYear.test.tsx index 4012e3de3..162d54409 100644 --- a/packages/amis/__tests__/renderers/Form/inputYear.test.tsx +++ b/packages/amis/__tests__/renderers/Form/inputYear.test.tsx @@ -2,8 +2,8 @@ import React = require('react'); import PageRenderer from '../../../../amis-core/src/renderers/Form'; import * as renderer from 'react-test-renderer'; import {render, fireEvent, cleanup, getByText} from '@testing-library/react'; -import '../../../src/themes/default'; -import {render as amisRender} from '../../../src/index'; +import '../../../src'; +import {render as amisRender} from '../../../src'; import {makeEnv} from '../../helper'; import moment from 'moment'; diff --git a/packages/amis/__tests__/renderers/Form/inputYearRange.test.tsx b/packages/amis/__tests__/renderers/Form/inputYearRange.test.tsx index 31ec81d66..c5197e84a 100644 --- a/packages/amis/__tests__/renderers/Form/inputYearRange.test.tsx +++ b/packages/amis/__tests__/renderers/Form/inputYearRange.test.tsx @@ -2,8 +2,8 @@ import React = require('react'); import PageRenderer from '../../../../amis-core/src/renderers/Form'; import * as renderer from 'react-test-renderer'; import {render, fireEvent, screen, within} from '@testing-library/react'; -import '../../../src/themes/default'; -import {render as amisRender} from '../../../src/index'; +import '../../../src'; +import {render as amisRender} from '../../../src'; import {makeEnv} from '../../helper'; import moment from 'moment'; diff --git a/packages/amis/__tests__/renderers/Form/list.test.tsx b/packages/amis/__tests__/renderers/Form/list.test.tsx index 97032d179..2894007a4 100644 --- a/packages/amis/__tests__/renderers/Form/list.test.tsx +++ b/packages/amis/__tests__/renderers/Form/list.test.tsx @@ -1,9 +1,9 @@ import React = require('react'); import {render, cleanup, fireEvent, waitFor} from '@testing-library/react'; -import '../../../src/themes/default'; -import {render as amisRender} from '../../../src/index'; +import '../../../src'; +import {render as amisRender} from '../../../src'; import {makeEnv, wait} from '../../helper'; -import {clearStoresCache} from '../../../src/factory'; +import {clearStoresCache} from 'amis'; afterEach(() => { cleanup(); diff --git a/packages/amis/__tests__/renderers/Form/mobileCity.test.tsx b/packages/amis/__tests__/renderers/Form/mobileCity.test.tsx index e2a043c32..b40ecab91 100644 --- a/packages/amis/__tests__/renderers/Form/mobileCity.test.tsx +++ b/packages/amis/__tests__/renderers/Form/mobileCity.test.tsx @@ -1,7 +1,7 @@ import React = require('react'); import {render, fireEvent, screen} from '@testing-library/react'; -import '../../../src/themes/default'; -import {render as amisRender} from '../../../src/index'; +import '../../../src'; +import {render as amisRender} from '../../../src'; import {createMockMediaMatcher, makeEnv, wait} from '../../helper'; import {act} from 'react-dom/test-utils'; diff --git a/packages/amis/__tests__/renderers/Form/mobileInputDate.test.tsx b/packages/amis/__tests__/renderers/Form/mobileInputDate.test.tsx index e10298f70..f7b14104c 100644 --- a/packages/amis/__tests__/renderers/Form/mobileInputDate.test.tsx +++ b/packages/amis/__tests__/renderers/Form/mobileInputDate.test.tsx @@ -1,8 +1,8 @@ import React = require('react'); import {render, fireEvent} from '@testing-library/react'; -import '../../../src/themes/default'; +import '../../../src'; import moment from 'moment'; -import {render as amisRender} from '../../../src/index'; +import {render as amisRender} from '../../../src'; import {createMockMediaMatcher, makeEnv} from '../../helper'; let originalMatchMedia: any; diff --git a/packages/amis/__tests__/renderers/Form/mobileNestSelect.test.tsx b/packages/amis/__tests__/renderers/Form/mobileNestSelect.test.tsx index 5518d809c..b7341d8a2 100644 --- a/packages/amis/__tests__/renderers/Form/mobileNestSelect.test.tsx +++ b/packages/amis/__tests__/renderers/Form/mobileNestSelect.test.tsx @@ -1,8 +1,8 @@ import React = require('react'); import {render, fireEvent, screen} from '@testing-library/react'; -import '../../../src/themes/default'; +import '../../../src'; -import {render as amisRender} from '../../../src/index'; +import {render as amisRender} from '../../../src'; import {createMockMediaMatcher, makeEnv} from '../../helper'; let originalMatchMedia: any; diff --git a/packages/amis/__tests__/renderers/Form/number.test.tsx b/packages/amis/__tests__/renderers/Form/number.test.tsx index 0d2d70f44..40d491228 100644 --- a/packages/amis/__tests__/renderers/Form/number.test.tsx +++ b/packages/amis/__tests__/renderers/Form/number.test.tsx @@ -1,7 +1,7 @@ import React = require('react'); import {render, fireEvent} from '@testing-library/react'; -import '../../../src/themes/default'; -import {render as amisRender} from '../../../src/index'; +import '../../../src'; +import {render as amisRender} from '../../../src'; import {makeEnv, wait} from '../../helper'; test('Renderer:number', async () => { diff --git a/packages/amis/__tests__/renderers/Form/options.test.tsx b/packages/amis/__tests__/renderers/Form/options.test.tsx index 6a3400a36..3468bf34d 100644 --- a/packages/amis/__tests__/renderers/Form/options.test.tsx +++ b/packages/amis/__tests__/renderers/Form/options.test.tsx @@ -1,9 +1,9 @@ import React = require('react'); import {render, cleanup, fireEvent} from '@testing-library/react'; -import '../../../src/themes/default'; -import {render as amisRender} from '../../../src/index'; +import '../../../src'; +import {render as amisRender} from '../../../src'; import {makeEnv, wait} from '../../helper'; -import {clearStoresCache} from '../../../src/factory'; +import {clearStoresCache} from 'amis'; afterEach(() => { cleanup(); diff --git a/packages/amis/__tests__/renderers/Form/panel.test.tsx b/packages/amis/__tests__/renderers/Form/panel.test.tsx index 95cb3cd2d..1392cbf99 100644 --- a/packages/amis/__tests__/renderers/Form/panel.test.tsx +++ b/packages/amis/__tests__/renderers/Form/panel.test.tsx @@ -1,9 +1,9 @@ import React = require('react'); import {render, cleanup} from '@testing-library/react'; -import '../../../src/themes/default'; -import {render as amisRender} from '../../../src/index'; +import '../../../src'; +import {render as amisRender} from '../../../src'; import {makeEnv} from '../../helper'; -import {clearStoresCache} from '../../../src/factory'; +import {clearStoresCache} from 'amis'; afterEach(() => { cleanup(); diff --git a/packages/amis/__tests__/renderers/Form/radios.test.tsx b/packages/amis/__tests__/renderers/Form/radios.test.tsx index 7df4cff2f..507c97340 100644 --- a/packages/amis/__tests__/renderers/Form/radios.test.tsx +++ b/packages/amis/__tests__/renderers/Form/radios.test.tsx @@ -1,9 +1,9 @@ import React = require('react'); import {render, cleanup, fireEvent, waitFor} from '@testing-library/react'; -import '../../../src/themes/default'; -import {render as amisRender} from '../../../src/index'; +import '../../../src'; +import {render as amisRender} from '../../../src'; import {makeEnv, wait} from '../../helper'; -import {clearStoresCache} from '../../../src/factory'; +import {clearStoresCache} from 'amis'; afterEach(() => { cleanup(); diff --git a/packages/amis/__tests__/renderers/Form/range.test.tsx b/packages/amis/__tests__/renderers/Form/range.test.tsx index 35328518c..94fc439d5 100644 --- a/packages/amis/__tests__/renderers/Form/range.test.tsx +++ b/packages/amis/__tests__/renderers/Form/range.test.tsx @@ -1,7 +1,7 @@ import React = require('react'); import {render, fireEvent} from '@testing-library/react'; -import '../../../src/themes/default'; -import {render as amisRender} from '../../../src/index'; +import '../../../src'; +import {render as amisRender} from '../../../src'; import {makeEnv, wait} from '../../helper'; test('Renderer:range', async () => { diff --git a/packages/amis/__tests__/renderers/Form/rating.test.tsx b/packages/amis/__tests__/renderers/Form/rating.test.tsx index 245fbac5e..9b41d9ae4 100644 --- a/packages/amis/__tests__/renderers/Form/rating.test.tsx +++ b/packages/amis/__tests__/renderers/Form/rating.test.tsx @@ -1,7 +1,7 @@ import React = require('react'); import {render} from '@testing-library/react'; -import '../../../src/themes/default'; -import {render as amisRender} from '../../../src/index'; +import '../../../src'; +import {render as amisRender} from '../../../src'; import {makeEnv} from '../../helper'; test('Renderer:rating', async () => { diff --git a/packages/amis/__tests__/renderers/Form/repeat.test.tsx b/packages/amis/__tests__/renderers/Form/repeat.test.tsx index 0767a2188..6b7bae630 100644 --- a/packages/amis/__tests__/renderers/Form/repeat.test.tsx +++ b/packages/amis/__tests__/renderers/Form/repeat.test.tsx @@ -1,7 +1,7 @@ import React = require('react'); import {render, fireEvent} from '@testing-library/react'; -import '../../../src/themes/default'; -import {render as amisRender} from '../../../src/index'; +import '../../../src'; +import {render as amisRender} from '../../../src'; import {makeEnv} from '../../helper'; test('Renderer:repeat', async () => { diff --git a/packages/amis/__tests__/renderers/Form/select.test.tsx b/packages/amis/__tests__/renderers/Form/select.test.tsx index 87c906c92..de6cea0bf 100644 --- a/packages/amis/__tests__/renderers/Form/select.test.tsx +++ b/packages/amis/__tests__/renderers/Form/select.test.tsx @@ -1,7 +1,7 @@ import React = require('react'); import {render, screen, fireEvent, waitFor} from '@testing-library/react'; -import '../../../src/themes/default'; -import {render as amisRender} from '../../../src/index'; +import '../../../src'; +import {render as amisRender} from '../../../src'; import {makeEnv, wait} from '../../helper'; test('Renderer:select menutpl', () => { diff --git a/packages/amis/__tests__/renderers/Form/service.test.tsx b/packages/amis/__tests__/renderers/Form/service.test.tsx index 71d0f5b7e..61edb4900 100644 --- a/packages/amis/__tests__/renderers/Form/service.test.tsx +++ b/packages/amis/__tests__/renderers/Form/service.test.tsx @@ -1,9 +1,9 @@ import React = require('react'); import {render, cleanup, fireEvent, waitFor} from '@testing-library/react'; -import '../../../src/themes/default'; -import {render as amisRender} from '../../../src/index'; +import '../../../src'; +import {render as amisRender} from '../../../src'; import {makeEnv, wait} from '../../helper'; -import {clearStoresCache} from '../../../src/factory'; +import {clearStoresCache} from 'amis'; afterEach(() => { cleanup(); diff --git a/packages/amis/__tests__/renderers/Form/static.test.tsx b/packages/amis/__tests__/renderers/Form/static.test.tsx index 6e046051e..bfaf68e97 100644 --- a/packages/amis/__tests__/renderers/Form/static.test.tsx +++ b/packages/amis/__tests__/renderers/Form/static.test.tsx @@ -1,9 +1,9 @@ import React = require('react'); import {render, cleanup} from '@testing-library/react'; -import '../../../src/themes/default'; -import {render as amisRender} from '../../../src/index'; +import '../../../src'; +import {render as amisRender} from '../../../src'; import {makeEnv} from '../../helper'; -import {clearStoresCache} from '../../../src/factory'; +import {clearStoresCache} from 'amis'; afterEach(() => { cleanup(); diff --git a/packages/amis/__tests__/renderers/Form/switch.test.tsx b/packages/amis/__tests__/renderers/Form/switch.test.tsx index 21a538145..f04cc02b7 100644 --- a/packages/amis/__tests__/renderers/Form/switch.test.tsx +++ b/packages/amis/__tests__/renderers/Form/switch.test.tsx @@ -1,9 +1,9 @@ import React = require('react'); import {render, cleanup} from '@testing-library/react'; -import '../../../src/themes/default'; -import {render as amisRender} from '../../../src/index'; +import '../../../src'; +import {render as amisRender} from '../../../src'; import {makeEnv} from '../../helper'; -import {clearStoresCache} from '../../../src/factory'; +import {clearStoresCache} from 'amis'; afterEach(() => { cleanup(); diff --git a/packages/amis/__tests__/renderers/Form/tabs.test.tsx b/packages/amis/__tests__/renderers/Form/tabs.test.tsx index e88edda62..3dba12673 100644 --- a/packages/amis/__tests__/renderers/Form/tabs.test.tsx +++ b/packages/amis/__tests__/renderers/Form/tabs.test.tsx @@ -1,9 +1,9 @@ import React = require('react'); import {render, cleanup} from '@testing-library/react'; -import '../../../src/themes/default'; -import {render as amisRender} from '../../../src/index'; +import '../../../src'; +import {render as amisRender} from '../../../src'; import {makeEnv} from '../../helper'; -import {clearStoresCache} from '../../../src/factory'; +import {clearStoresCache} from 'amis'; afterEach(() => { cleanup(); diff --git a/packages/amis/__tests__/renderers/Form/tabsTransfer.test.tsx b/packages/amis/__tests__/renderers/Form/tabsTransfer.test.tsx index f4f0f5e2a..0c00ea19c 100644 --- a/packages/amis/__tests__/renderers/Form/tabsTransfer.test.tsx +++ b/packages/amis/__tests__/renderers/Form/tabsTransfer.test.tsx @@ -1,7 +1,7 @@ import React = require('react'); import {render} from '@testing-library/react'; -import '../../../src/themes/default'; -import {render as amisRender} from '../../../src/index'; +import '../../../src'; +import {render as amisRender} from '../../../src'; import {makeEnv} from '../../helper'; test('Renderer:tabs-transfer', () => { diff --git a/packages/amis/__tests__/renderers/Form/tabsTransferPicker.test.tsx b/packages/amis/__tests__/renderers/Form/tabsTransferPicker.test.tsx index 530e9e6f4..81c6cf807 100644 --- a/packages/amis/__tests__/renderers/Form/tabsTransferPicker.test.tsx +++ b/packages/amis/__tests__/renderers/Form/tabsTransferPicker.test.tsx @@ -1,7 +1,7 @@ import React = require('react'); import {render, fireEvent, cleanup, screen} from '@testing-library/react'; -import '../../../src/themes/default'; -import {render as amisRender} from '../../../src/index'; +import '../../../src'; +import {render as amisRender} from '../../../src'; import {makeEnv, wait} from '../../helper'; test('Renderer:TabsTransferPicker', async () => { diff --git a/packages/amis/__tests__/renderers/Form/testarea.test.tsx b/packages/amis/__tests__/renderers/Form/testarea.test.tsx index 9d95fd619..891d6f039 100644 --- a/packages/amis/__tests__/renderers/Form/testarea.test.tsx +++ b/packages/amis/__tests__/renderers/Form/testarea.test.tsx @@ -1,7 +1,7 @@ import React = require('react'); import {render, fireEvent, waitFor} from '@testing-library/react'; -import '../../../src/themes/default'; -import {render as amisRender} from '../../../src/index'; +import '../../../src'; +import {render as amisRender} from '../../../src'; import {makeEnv} from '../../helper'; test('Renderer:textarea', async () => { diff --git a/packages/amis/__tests__/renderers/Form/text.test.tsx b/packages/amis/__tests__/renderers/Form/text.test.tsx index 70b3e8485..661231bc5 100644 --- a/packages/amis/__tests__/renderers/Form/text.test.tsx +++ b/packages/amis/__tests__/renderers/Form/text.test.tsx @@ -1,9 +1,9 @@ import React = require('react'); import {render, cleanup, fireEvent, waitFor} from '@testing-library/react'; -import '../../../src/themes/default'; -import {render as amisRender} from '../../../src/index'; +import '../../../src'; +import {render as amisRender} from '../../../src'; import {makeEnv, wait} from '../../helper'; -import {clearStoresCache} from '../../../src/factory'; +import {clearStoresCache} from 'amis'; afterEach(() => { cleanup(); diff --git a/packages/amis/__tests__/renderers/Form/time.test.tsx b/packages/amis/__tests__/renderers/Form/time.test.tsx index 35c413cae..db4c360cd 100644 --- a/packages/amis/__tests__/renderers/Form/time.test.tsx +++ b/packages/amis/__tests__/renderers/Form/time.test.tsx @@ -2,8 +2,8 @@ import React = require('react'); import PageRenderer from '../../../../amis-core/src/renderers/Form'; import * as renderer from 'react-test-renderer'; import {render, fireEvent, cleanup, getByText} from '@testing-library/react'; -import '../../../src/themes/default'; -import {render as amisRender} from '../../../src/index'; +import '../../../src'; +import {render as amisRender} from '../../../src'; import {makeEnv, wait} from '../../helper'; test('Renderer:time', async () => { diff --git a/packages/amis/__tests__/renderers/Form/transfer.test.tsx b/packages/amis/__tests__/renderers/Form/transfer.test.tsx index b329b4378..5250c5968 100644 --- a/packages/amis/__tests__/renderers/Form/transfer.test.tsx +++ b/packages/amis/__tests__/renderers/Form/transfer.test.tsx @@ -1,7 +1,7 @@ import React = require('react'); import {render} from '@testing-library/react'; -import '../../../src/themes/default'; -import {render as amisRender} from '../../../src/index'; +import '../../../src'; +import {render as amisRender} from '../../../src'; import {makeEnv} from '../../helper'; test('Renderer:transfer', () => { diff --git a/packages/amis/__tests__/renderers/Form/usersSelect.test.tsx b/packages/amis/__tests__/renderers/Form/usersSelect.test.tsx index 6b7c7db94..c518a600d 100644 --- a/packages/amis/__tests__/renderers/Form/usersSelect.test.tsx +++ b/packages/amis/__tests__/renderers/Form/usersSelect.test.tsx @@ -1,7 +1,7 @@ import React = require('react'); import {render, cleanup} from '@testing-library/react'; -import '../../../src/themes/default'; -import {render as amisRender} from '../../../src/index'; +import '../../../src'; +import {render as amisRender} from '../../../src'; import {makeEnv} from '../../helper'; test('Renderer:usersselect', async () => { diff --git a/packages/amis/__tests__/renderers/Form/valueFormula.test.tsx b/packages/amis/__tests__/renderers/Form/valueFormula.test.tsx index 5acab199e..d9ab9ee91 100644 --- a/packages/amis/__tests__/renderers/Form/valueFormula.test.tsx +++ b/packages/amis/__tests__/renderers/Form/valueFormula.test.tsx @@ -6,8 +6,8 @@ import { getByText, waitFor } from '@testing-library/react'; -import '../../../src/themes/default'; -import {render as amisRender} from '../../../src/index'; +import '../../../src'; +import {render as amisRender} from '../../../src'; import {makeEnv, wait} from '../../helper'; /** diff --git a/packages/amis/__tests__/renderers/Grid2D.test.tsx b/packages/amis/__tests__/renderers/Grid2D.test.tsx index b06390874..cbf589f05 100644 --- a/packages/amis/__tests__/renderers/Grid2D.test.tsx +++ b/packages/amis/__tests__/renderers/Grid2D.test.tsx @@ -1,7 +1,7 @@ import React = require('react'); import {render} from '@testing-library/react'; -import '../../src/themes/default'; -import {render as amisRender} from '../../src/index'; +import '../../src'; +import {render as amisRender} from '../../src'; import {makeEnv} from '../helper'; test('Renderer:grid2d', () => { diff --git a/packages/amis/__tests__/renderers/GridNav.test.tsx b/packages/amis/__tests__/renderers/GridNav.test.tsx index 4af11f0b2..56322e358 100644 --- a/packages/amis/__tests__/renderers/GridNav.test.tsx +++ b/packages/amis/__tests__/renderers/GridNav.test.tsx @@ -1,7 +1,7 @@ import React = require('react'); import {render} from '@testing-library/react'; -import '../../src/themes/default'; -import {render as amisRender} from '../../src/index'; +import '../../src'; +import {render as amisRender} from '../../src'; import {makeEnv} from '../helper'; test('Renderer:gridnav', () => { diff --git a/packages/amis/__tests__/renderers/HBox.test.tsx b/packages/amis/__tests__/renderers/HBox.test.tsx index c335c41c8..2d997cb5d 100644 --- a/packages/amis/__tests__/renderers/HBox.test.tsx +++ b/packages/amis/__tests__/renderers/HBox.test.tsx @@ -1,7 +1,7 @@ import React = require('react'); import {render} from '@testing-library/react'; -import '../../src/themes/default'; -import {render as amisRender} from '../../src/index'; +import '../../src'; +import {render as amisRender} from '../../src'; import {makeEnv} from '../helper'; test('Renderer:hbox', async () => { diff --git a/packages/amis/__tests__/renderers/IFrame.test.tsx b/packages/amis/__tests__/renderers/IFrame.test.tsx index a22565bd9..08d1c558b 100644 --- a/packages/amis/__tests__/renderers/IFrame.test.tsx +++ b/packages/amis/__tests__/renderers/IFrame.test.tsx @@ -1,7 +1,7 @@ import React = require('react'); import {render} from '@testing-library/react'; -import '../../src/themes/default'; -import {render as amisRender} from '../../src/index'; +import '../../src'; +import {render as amisRender} from '../../src'; import {makeEnv} from '../helper'; test('Renderer:iframe', async () => { diff --git a/packages/amis/__tests__/renderers/Image.test.tsx b/packages/amis/__tests__/renderers/Image.test.tsx index 19f061b23..c8f2a1a7a 100644 --- a/packages/amis/__tests__/renderers/Image.test.tsx +++ b/packages/amis/__tests__/renderers/Image.test.tsx @@ -1,7 +1,7 @@ import React = require('react'); import {render} from '@testing-library/react'; -import '../../src/themes/default'; -import {render as amisRender} from '../../src/index'; +import '../../src'; +import {render as amisRender} from '../../src'; import {makeEnv} from '../helper'; test('Renderer:image', async () => { diff --git a/packages/amis/__tests__/renderers/JSON.test.tsx b/packages/amis/__tests__/renderers/JSON.test.tsx index 32733a547..65d329471 100644 --- a/packages/amis/__tests__/renderers/JSON.test.tsx +++ b/packages/amis/__tests__/renderers/JSON.test.tsx @@ -1,7 +1,7 @@ import React = require('react'); import {render} from '@testing-library/react'; -import '../../src/themes/default'; -import {render as amisRender} from '../../src/index'; +import '../../src'; +import {render as amisRender} from '../../src'; import {makeEnv} from '../helper'; test('Renderer:json', () => { diff --git a/packages/amis/__tests__/renderers/Link.test.tsx b/packages/amis/__tests__/renderers/Link.test.tsx index ce3af1228..f74d90317 100644 --- a/packages/amis/__tests__/renderers/Link.test.tsx +++ b/packages/amis/__tests__/renderers/Link.test.tsx @@ -1,7 +1,7 @@ import React = require('react'); import {render} from '@testing-library/react'; -import '../../src/themes/default'; -import {render as amisRender} from '../../src/index'; +import '../../src'; +import {render as amisRender} from '../../src'; import {makeEnv} from '../helper'; test('Renderer:link', async () => { diff --git a/packages/amis/__tests__/renderers/List.test.tsx b/packages/amis/__tests__/renderers/List.test.tsx index ca8e7f604..589097235 100644 --- a/packages/amis/__tests__/renderers/List.test.tsx +++ b/packages/amis/__tests__/renderers/List.test.tsx @@ -1,7 +1,7 @@ import React = require('react'); import {render} from '@testing-library/react'; -import '../../src/themes/default'; -import {render as amisRender} from '../../src/index'; +import '../../src'; +import {render as amisRender} from '../../src'; import {makeEnv} from '../helper'; import rows from '../mockData/rows'; diff --git a/packages/amis/__tests__/renderers/Mapping.test.tsx b/packages/amis/__tests__/renderers/Mapping.test.tsx index 1b846a3e7..d42b80391 100644 --- a/packages/amis/__tests__/renderers/Mapping.test.tsx +++ b/packages/amis/__tests__/renderers/Mapping.test.tsx @@ -1,7 +1,7 @@ import React = require('react'); import {render} from '@testing-library/react'; -import '../../src/themes/default'; -import {render as amisRender} from '../../src/index'; +import '../../src'; +import {render as amisRender} from '../../src'; import {makeEnv} from '../helper'; test('Renderer:mapping', async () => { diff --git a/packages/amis/__tests__/renderers/Markdown.test.tsx b/packages/amis/__tests__/renderers/Markdown.test.tsx index 65bfe999b..79ef7b6d9 100644 --- a/packages/amis/__tests__/renderers/Markdown.test.tsx +++ b/packages/amis/__tests__/renderers/Markdown.test.tsx @@ -1,8 +1,8 @@ import React = require('react'); import {render, waitFor} from '@testing-library/react'; -import '../../src/themes/default'; -import {render as amisRender} from '../../src/index'; +import '../../src'; +import {render as amisRender} from '../../src'; import {makeEnv} from '../helper'; test('Renderer:markdown', async () => { diff --git a/packages/amis/__tests__/renderers/Nav.test.tsx b/packages/amis/__tests__/renderers/Nav.test.tsx index 60436d462..6560c9b44 100644 --- a/packages/amis/__tests__/renderers/Nav.test.tsx +++ b/packages/amis/__tests__/renderers/Nav.test.tsx @@ -1,7 +1,7 @@ import React = require('react'); import {render} from '@testing-library/react'; -import '../../src/themes/default'; -import {render as amisRender} from '../../src/index'; +import '../../src'; +import {render as amisRender} from '../../src'; import {makeEnv} from '../helper'; test('Renderer:nav', () => { diff --git a/packages/amis/__tests__/renderers/Page.test.tsx b/packages/amis/__tests__/renderers/Page.test.tsx index 13d184fec..9911f8416 100644 --- a/packages/amis/__tests__/renderers/Page.test.tsx +++ b/packages/amis/__tests__/renderers/Page.test.tsx @@ -2,10 +2,10 @@ import React = require('react'); import PageRenderer from '../../src/renderers/Page'; import * as renderer from 'react-test-renderer'; import {render, fireEvent, cleanup, waitFor} from '@testing-library/react'; -import '../../src/themes/default'; -import {render as amisRender} from '../../src/index'; +import '../../src'; +import {render as amisRender} from '../../src'; import {wait, makeEnv} from '../helper'; -import {clearStoresCache} from '../../src/factory'; +import {clearStoresCache} from 'amis'; import {createMemoryHistory} from 'history'; afterEach(() => { diff --git a/packages/amis/__tests__/renderers/Pagination.test.tsx b/packages/amis/__tests__/renderers/Pagination.test.tsx index 577842f6f..05015df81 100644 --- a/packages/amis/__tests__/renderers/Pagination.test.tsx +++ b/packages/amis/__tests__/renderers/Pagination.test.tsx @@ -1,7 +1,7 @@ import React = require('react'); import {render} from '@testing-library/react'; -import '../../src/themes/default'; -import {render as amisRender} from '../../src/index'; +import '../../src'; +import {render as amisRender} from '../../src'; import {makeEnv} from '../helper'; import rows from '../mockData/rows'; diff --git a/packages/amis/__tests__/renderers/Portlet.test.tsx b/packages/amis/__tests__/renderers/Portlet.test.tsx index 6317239cc..0b4b23cab 100644 --- a/packages/amis/__tests__/renderers/Portlet.test.tsx +++ b/packages/amis/__tests__/renderers/Portlet.test.tsx @@ -1,7 +1,7 @@ import React = require('react'); import {render} from '@testing-library/react'; -import '../../src/themes/default'; -import {render as amisRender} from '../../src/index'; +import '../../src'; +import {render as amisRender} from '../../src'; import {makeEnv} from '../helper'; test('Renderer:portlet', () => { diff --git a/packages/amis/__tests__/renderers/Progress.test.tsx b/packages/amis/__tests__/renderers/Progress.test.tsx index 2035dfed8..076dd6b6b 100644 --- a/packages/amis/__tests__/renderers/Progress.test.tsx +++ b/packages/amis/__tests__/renderers/Progress.test.tsx @@ -1,7 +1,7 @@ import React = require('react'); import {render} from '@testing-library/react'; -import '../../src/themes/default'; -import {render as amisRender} from '../../src/index'; +import '../../src'; +import {render as amisRender} from '../../src'; import {makeEnv} from '../helper'; test('Renderer:progress', () => { diff --git a/packages/amis/__tests__/renderers/Property.test.tsx b/packages/amis/__tests__/renderers/Property.test.tsx index b434fd5f6..ecdd3010b 100644 --- a/packages/amis/__tests__/renderers/Property.test.tsx +++ b/packages/amis/__tests__/renderers/Property.test.tsx @@ -1,7 +1,7 @@ import React = require('react'); import {render} from '@testing-library/react'; -import '../../src/themes/default'; -import {render as amisRender} from '../../src/index'; +import '../../src'; +import {render as amisRender} from '../../src'; import {makeEnv} from '../helper'; test('Renderer:property', () => { diff --git a/packages/amis/__tests__/renderers/QRCode.test.tsx b/packages/amis/__tests__/renderers/QRCode.test.tsx index eb40525fa..a23948be7 100644 --- a/packages/amis/__tests__/renderers/QRCode.test.tsx +++ b/packages/amis/__tests__/renderers/QRCode.test.tsx @@ -1,7 +1,7 @@ import React = require('react'); import {render, fireEvent} from '@testing-library/react'; -import '../../src/themes/default'; -import {render as amisRender} from '../../src/index'; +import '../../src'; +import {render as amisRender} from '../../src'; import {makeEnv} from '../helper'; import 'jest-canvas-mock'; diff --git a/packages/amis/__tests__/renderers/SearchBox.test.tsx b/packages/amis/__tests__/renderers/SearchBox.test.tsx index cb22abda1..c5ff613bd 100644 --- a/packages/amis/__tests__/renderers/SearchBox.test.tsx +++ b/packages/amis/__tests__/renderers/SearchBox.test.tsx @@ -1,7 +1,7 @@ import React = require('react'); import {render} from '@testing-library/react'; -import '../../src/themes/default'; -import {render as amisRender} from '../../src/index'; +import '../../src'; +import {render as amisRender} from '../../src'; import {makeEnv} from '../helper'; test('Renderer:searchbox', () => { diff --git a/packages/amis/__tests__/renderers/SparkLine.test.tsx b/packages/amis/__tests__/renderers/SparkLine.test.tsx index 8491f6b09..b9d99a945 100644 --- a/packages/amis/__tests__/renderers/SparkLine.test.tsx +++ b/packages/amis/__tests__/renderers/SparkLine.test.tsx @@ -1,7 +1,7 @@ import React = require('react'); import {render} from '@testing-library/react'; -import '../../src/themes/default'; -import {render as amisRender} from '../../src/index'; +import '../../src'; +import {render as amisRender} from '../../src'; import {makeEnv} from '../helper'; test('Renderer:sparkline', () => { diff --git a/packages/amis/__tests__/renderers/Status.test.tsx b/packages/amis/__tests__/renderers/Status.test.tsx index bf063311c..938abb701 100644 --- a/packages/amis/__tests__/renderers/Status.test.tsx +++ b/packages/amis/__tests__/renderers/Status.test.tsx @@ -1,7 +1,7 @@ import React = require('react'); import {render} from '@testing-library/react'; -import '../../src/themes/default'; -import {render as amisRender} from '../../src/index'; +import '../../src'; +import {render as amisRender} from '../../src'; import {makeEnv} from '../helper'; test('Renderer:status', () => { diff --git a/packages/amis/__tests__/renderers/Steps.test.tsx b/packages/amis/__tests__/renderers/Steps.test.tsx index 109afb119..775223e2f 100644 --- a/packages/amis/__tests__/renderers/Steps.test.tsx +++ b/packages/amis/__tests__/renderers/Steps.test.tsx @@ -1,7 +1,7 @@ import React = require('react'); import {render} from '@testing-library/react'; -import '../../src/themes/default'; -import {render as amisRender} from '../../src/index'; +import '../../src'; +import {render as amisRender} from '../../src'; import {makeEnv} from '../helper'; test('Renderer:steps', () => { diff --git a/packages/amis/__tests__/renderers/Table.test.tsx b/packages/amis/__tests__/renderers/Table.test.tsx index 81ca74f41..b856d7630 100644 --- a/packages/amis/__tests__/renderers/Table.test.tsx +++ b/packages/amis/__tests__/renderers/Table.test.tsx @@ -1,7 +1,7 @@ import React = require('react'); import {render} from '@testing-library/react'; -import '../../src/themes/default'; -import {render as amisRender} from '../../src/index'; +import '../../src'; +import {render as amisRender} from '../../src'; import {makeEnv} from '../helper'; import rows from '../mockData/rows'; diff --git a/packages/amis/__tests__/renderers/TableView.test.tsx b/packages/amis/__tests__/renderers/TableView.test.tsx index 7eba7b025..dba21a468 100644 --- a/packages/amis/__tests__/renderers/TableView.test.tsx +++ b/packages/amis/__tests__/renderers/TableView.test.tsx @@ -1,7 +1,7 @@ import React = require('react'); import {render} from '@testing-library/react'; -import '../../src/themes/default'; -import {render as amisRender} from '../../src/index'; +import '../../src'; +import {render as amisRender} from '../../src'; import {makeEnv} from '../helper'; test('Renderer:tableview', () => { diff --git a/packages/amis/__tests__/renderers/Tabs.test.tsx b/packages/amis/__tests__/renderers/Tabs.test.tsx index dcf547c8b..f4a078f95 100644 --- a/packages/amis/__tests__/renderers/Tabs.test.tsx +++ b/packages/amis/__tests__/renderers/Tabs.test.tsx @@ -1,9 +1,9 @@ import React = require('react'); import {render, cleanup} from '@testing-library/react'; -import '../../src/themes/default'; -import {render as amisRender} from '../../src/index'; +import '../../src'; +import {render as amisRender} from '../../src'; import {makeEnv} from '../helper'; -import {clearStoresCache} from '../../src/factory'; +import {clearStoresCache} from 'amis'; afterEach(() => { cleanup(); diff --git a/packages/amis/__tests__/renderers/Tasks.test.tsx b/packages/amis/__tests__/renderers/Tasks.test.tsx index a60c1ca33..3769009ea 100644 --- a/packages/amis/__tests__/renderers/Tasks.test.tsx +++ b/packages/amis/__tests__/renderers/Tasks.test.tsx @@ -1,7 +1,7 @@ import React = require('react'); import {render} from '@testing-library/react'; -import '../../src/themes/default'; -import {render as amisRender} from '../../src/index'; +import '../../src'; +import {render as amisRender} from '../../src'; import {makeEnv} from '../helper'; test('Renderer:tesks', () => { diff --git a/packages/amis/__tests__/renderers/Timeline.test.tsx b/packages/amis/__tests__/renderers/Timeline.test.tsx index 80c0bffb9..57a3f8771 100644 --- a/packages/amis/__tests__/renderers/Timeline.test.tsx +++ b/packages/amis/__tests__/renderers/Timeline.test.tsx @@ -1,9 +1,9 @@ import React = require('react'); import {render, cleanup} from '@testing-library/react'; -import '../../src/themes/default'; -import {render as amisRender} from '../../src/index'; +import '../../src'; +import {render as amisRender} from '../../src'; import {makeEnv} from '../helper'; -import {clearStoresCache} from '../../src/factory'; +import {clearStoresCache} from 'amis'; afterEach(() => { cleanup(); @@ -16,27 +16,27 @@ test('Renderer:timeline', async () => { { type: 'timeline', items: [ - { - time: "2019-02-07", - title: "节点数据", - color: "#ffb200", - }, - { - time: "2019-02-08", - title: "节点数据", - color: "#4F86F4", - }, - { - time: "2019-02-09", - title: "节点数据", - color: "success", - }, - { - time: "2019-02-09", - title: "节点数据", - color: "warning", - } - ] + { + time: '2019-02-07', + title: '节点数据', + color: '#ffb200' + }, + { + time: '2019-02-08', + title: '节点数据', + color: '#4F86F4' + }, + { + time: '2019-02-09', + title: '节点数据', + color: 'success' + }, + { + time: '2019-02-09', + title: '节点数据', + color: 'warning' + } + ] }, {}, makeEnv() diff --git a/packages/amis/__tests__/renderers/Wizard.test.tsx b/packages/amis/__tests__/renderers/Wizard.test.tsx index ff54986dc..73e38a780 100644 --- a/packages/amis/__tests__/renderers/Wizard.test.tsx +++ b/packages/amis/__tests__/renderers/Wizard.test.tsx @@ -7,10 +7,10 @@ import { waitFor, waitForElementToBeRemoved } from '@testing-library/react'; -import '../../src/themes/default'; -import {render as amisRender} from '../../src/index'; +import '../../src'; +import {render as amisRender} from '../../src'; import {wait, makeEnv} from '../helper'; -import {clearStoresCache} from '../../src/factory'; +import {clearStoresCache} from 'amis'; afterEach(() => { cleanup(); diff --git a/packages/amis/__tests__/renderers/__snapshots__/Breadcrumb.test.tsx.snap b/packages/amis/__tests__/renderers/__snapshots__/Breadcrumb.test.tsx.snap index d873b141a..d037aa9c5 100644 --- a/packages/amis/__tests__/renderers/__snapshots__/Breadcrumb.test.tsx.snap +++ b/packages/amis/__tests__/renderers/__snapshots__/Breadcrumb.test.tsx.snap @@ -62,6 +62,110 @@ exports[`Renderer:breadcrumb 1`] = `
`; +exports[`Renderer:breadcrumb className 1`] = ` +
+
+ + + + + 首页 + + + + + > + + + + + 上级页面 + + + + + + + + + + + > + + + + + 当前页面 + + + +
+
+`; + exports[`Renderer:breadcrumb dropdown 1`] = `
`; +exports[`Renderer:breadcrumb tooltip labelMaxLength 1`] = ` +
+
+
+
+
+ + + + + + + + > + + + + + 上级页面上级页面上级页面上级页面... + + + + + > + + + + + 当前页面 + + + +
+
+
+
+
+`; + +exports[`Renderer:breadcrumb tooltip labelMaxLength 2`] = ` +
+
+
+
+
+ + + + + + + + > + + + + + 上级页面上级页面上级页面上级页面... + + + + + > + + + + + 当前页面 + + + +
+
+
+
+
+`; + +exports[`Renderer:breadcrumb tooltip labelMaxLength 3`] = ` +
+
+
+
+
+ + + + + + + + > + + + + + 上级页面上级页面上级页面上级页面... + + + + + > + + + + + 当前页面 + + + +
+
+
+
+
+`; + +exports[`Renderer:breadcrumb tooltip labelMaxLength 4`] = ` +
+
+
+
+
+ + + + + + + + > + + + + + 上级页面上级页面上级页面上级页面... + + + + + > + + + + + 当前页面 + + + +
+
+
+
+
+`; + exports[`Renderer:breadcrumb var 1`] = `
`; +exports[`Renderer:cards hightlight 2`] = ` +
+
+
+
+
+
+
+ +
+
+
+
+ + + 标题 + + +
+
+
+ + + + 标签 + + +
+
+
+ + + 这里是内容 + + +
+ +
+
+
+
+
+
+
+
+`; + exports[`Renderer:cards media 1`] = `
{ diff --git a/packages/amis/__tests__/stores/index.test.ts b/packages/amis/__tests__/stores/index.test.ts index 344d0051b..f7f685e31 100644 --- a/packages/amis/__tests__/stores/index.test.ts +++ b/packages/amis/__tests__/stores/index.test.ts @@ -1,54 +1,53 @@ -import { - RendererStore -} from '../../src/store/index'; -import { getSnapshot, getEnv } from 'mobx-state-tree'; -import { ServiceStore } from '../../src/store/service'; +import {RendererStore} from '../../src'; +import {getSnapshot, getEnv} from 'mobx-state-tree'; +import {ServiceStore} from '../../src'; test('store:index', () => { - const store = RendererStore.create({}); + const store = RendererStore.create({}); - expect(getSnapshot(store)).toMatchSnapshot(); + expect(getSnapshot(store)).toMatchSnapshot(); - const serviceStore = ServiceStore.create({ - path: '/xxx', - storeType: ServiceStore.name, - id: '1' - }); - store.addStore(serviceStore); - - expect(getSnapshot(store)).toMatchSnapshot(); + const serviceStore = ServiceStore.create({ + path: '/xxx', + storeType: ServiceStore.name, + id: '1' + }); + store.addStore(serviceStore); - const serviceStore2 = ServiceStore.create({ - path: '/yyy', - storeType: ServiceStore.name, - id: '2', - parentId: '1' - }); + expect(getSnapshot(store)).toMatchSnapshot(); - store.addStore(serviceStore2); - - expect(getSnapshot(store)).toMatchSnapshot(); + const serviceStore2 = ServiceStore.create({ + path: '/yyy', + storeType: ServiceStore.name, + id: '2', + parentId: '1' + }); - expect(serviceStore2.parentStore).toEqual(serviceStore); + store.addStore(serviceStore2); - store.removeStore(serviceStore2); - expect(getSnapshot(store)).toMatchSnapshot(); + expect(getSnapshot(store)).toMatchSnapshot(); + + expect(serviceStore2.parentStore).toEqual(serviceStore); + + store.removeStore(serviceStore2); + expect(getSnapshot(store)).toMatchSnapshot(); }); - test('store:index env', () => { - const fetcher = jest.fn(); - const notify = jest.fn(); - const isCancel = jest.fn(() => false); - + const fetcher = jest.fn(); + const notify = jest.fn(); + const isCancel = jest.fn(() => false); - const store = RendererStore.create({}, { - fetcher, - notify, - isCancel - }); + const store = RendererStore.create( + {}, + { + fetcher, + notify, + isCancel + } + ); - expect(store.fetcher).toBe(fetcher); - expect(store.notify).toBe(notify); - expect(store.isCancel).toBe(isCancel); -}); \ No newline at end of file + expect(store.fetcher).toBe(fetcher); + expect(store.notify).toBe(notify); + expect(store.isCancel).toBe(isCancel); +}); diff --git a/packages/amis/__tests__/stores/service.test.ts b/packages/amis/__tests__/stores/service.test.ts index 5cc6516b3..21fc36d7e 100644 --- a/packages/amis/__tests__/stores/service.test.ts +++ b/packages/amis/__tests__/stores/service.test.ts @@ -1,7 +1,7 @@ import {getSnapshot, getEnv, onSnapshot} from 'mobx-state-tree'; -import {StoreNode} from '../../src/store/node'; -import {ServiceStore} from '../../src/store/service'; -import {RendererStore} from '../../src/store'; +import {StoreNode} from '../../src'; +import {ServiceStore} from '../../src'; +import {RendererStore} from '../../src'; import omit = require('lodash/omit'); test('store:ServiceStore', () => { diff --git a/packages/amis/__tests__/utils/api.test.ts b/packages/amis/__tests__/utils/api.test.ts index 2051a0854..a9102a48a 100644 --- a/packages/amis/__tests__/utils/api.test.ts +++ b/packages/amis/__tests__/utils/api.test.ts @@ -1,7 +1,7 @@ -import {render as amisRender} from '../../src/index'; +import {render as amisRender} from '../../src'; import {wait, makeEnv} from '../helper'; import {render, fireEvent, cleanup} from '@testing-library/react'; -import {buildApi, isApiOutdated} from '../../src/utils/api'; +import {buildApi, isApiOutdated} from 'amis-core'; test('api:buildApi', () => { expect(buildApi('/api/xxx')).toMatchObject({ diff --git a/packages/amis/__tests__/utils/style.test.ts b/packages/amis/__tests__/utils/style.test.ts index 9d01d07af..669a728cb 100644 --- a/packages/amis/__tests__/utils/style.test.ts +++ b/packages/amis/__tests__/utils/style.test.ts @@ -1,8 +1,6 @@ -import '../../src/utils/tpl.ts'; -import '../../src/utils/tpl-builtin'; -import '../../src/utils/tpl-lodash'; +import '../../src'; -import {buildStyle} from '../../src/utils/style'; +import {buildStyle} from '../../src'; test('style var background', () => { expect( diff --git a/packages/amis/__tests__/utils/tpl-builtin.test.ts b/packages/amis/__tests__/utils/tpl-builtin.test.ts index 6d95ea160..de787cc7a 100644 --- a/packages/amis/__tests__/utils/tpl-builtin.test.ts +++ b/packages/amis/__tests__/utils/tpl-builtin.test.ts @@ -1,8 +1,5 @@ -import '../../src/utils/tpl.ts'; -import { - resolveVariableAndFilter, - dataMapping -} from '../../src/utils/tpl-builtin'; +import '../../src'; +import {resolveVariableAndFilter, dataMapping} from '../../src'; import moment from 'moment'; const filters = [ diff --git a/packages/amis/__tests__/utils/tpl.test.ts b/packages/amis/__tests__/utils/tpl.test.ts index 18ee0c860..8da342679 100644 --- a/packages/amis/__tests__/utils/tpl.test.ts +++ b/packages/amis/__tests__/utils/tpl.test.ts @@ -1,17 +1,19 @@ -import { - filter -} from '../../src/utils/tpl'; +import {filter} from '../../src'; -import '../../src/utils/tpl-builtin'; -import '../../src/utils/tpl-lodash'; +import '../../src'; +import '../../src'; test('filter', () => { - expect(filter('xxx_a=${a}&b=${b}', { - a: 1, - b: 2 - })).toEqual('xxx_a=1&b=2'); + expect( + filter('xxx_a=${a}&b=${b}', { + a: 1, + b: 2 + }) + ).toEqual('xxx_a=1&b=2'); - expect(filter('xxx_a=<%= data.a%>&b=<%= data.b%>', { - a: 1, - b: 2 - })).toEqual('xxx_a=1&b=2'); -}) \ No newline at end of file + expect( + filter('xxx_a=<%= data.a%>&b=<%= data.b%>', { + a: 1, + b: 2 + }) + ).toEqual('xxx_a=1&b=2'); +}); diff --git a/packages/amis/__tests__/utils/validations.test.ts b/packages/amis/__tests__/utils/validations.test.ts index db6fe91fa..734191635 100644 --- a/packages/amis/__tests__/utils/validations.test.ts +++ b/packages/amis/__tests__/utils/validations.test.ts @@ -1,4 +1,4 @@ -import {validate, str2rules} from '../../src/utils/validations'; +import {validate, str2rules} from '../../src'; test('validation:isRequired valid', () => { expect( diff --git a/packages/amis/package.json b/packages/amis/package.json index 864d7ccbe..4757b3573 100644 --- a/packages/amis/package.json +++ b/packages/amis/package.json @@ -169,44 +169,20 @@ ], "testRegex": "/.*\\.test\\.(ts|tsx|js)$", "moduleNameMapper": { - "\\.(css|less|sass|scss)$": "/__mocks__/styleMock.js", - "\\.(svg)$": "/__mocks__/svgMock.js" + "\\.(css|less|sass|scss)$": "/../../__mocks__/styleMock.js", + "\\.(svg)$": "/../../__mocks__/svgMock.js", + "\\.svg\\.js$": "/../../__mocks__/svgJsMock.js" }, "setupFilesAfterEnv": [ - "/__tests__/jest.setup.js" + "/../amis-core/__tests__/jest.setup.js" + ], + "testPathIgnorePatterns": [ + "/node_modules/", + "/.rollup.cache/" ], "globals": { "ts-jest": { - "diagnostics": false, - "tsconfig": { - "module": "commonjs", - "target": "es5", - "lib": [ - "es6", - "dom", - "ES2015", - "ES2021" - ], - "sourceMap": true, - "jsx": "react", - "moduleResolution": "node", - "rootDir": ".", - "importHelpers": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "sourceRoot": ".", - "noImplicitReturns": true, - "noImplicitThis": true, - "noImplicitAny": true, - "strictNullChecks": true, - "experimentalDecorators": true, - "emitDecoratorMetadata": false, - "typeRoots": [ - "./node_modules/@types", - "./types" - ], - "skipLibCheck": true - } + "diagnostics": false } } },