diff --git a/packages/devui/.eslintrc.js b/packages/devui/.eslintrc.js index eca0de40..c7232941 100644 --- a/packages/devui/.eslintrc.js +++ b/packages/devui/.eslintrc.js @@ -10,11 +10,19 @@ module.exports = { }, }, { - files: ['test/*.ts', 'test/*.tsx'], + files: ['tests/*.ts', 'tests/*.tsx'], extends: '../../eslintrc.ts.react.jest.base.json', parserOptions: { tsconfigRootDir: __dirname, - project: ['./test/tsconfig.json'], + project: ['./tests/tsconfig.json'], + }, + }, + { + files: ['.storybook/tests/*.ts', '.storybook/tests/*.tsx'], + extends: '../../eslintrc.ts.react.jest.base.json', + parserOptions: { + tsconfigRootDir: __dirname, + project: ['./.storybook/tsconfig.json'], }, }, ], diff --git a/packages/devui/package.json b/packages/devui/package.json index 68b65959..868956aa 100755 --- a/packages/devui/package.json +++ b/packages/devui/package.json @@ -52,6 +52,7 @@ "@storybook/addon-essentials": "^6.0.21", "@storybook/react": "^6.0.21", "@types/codemirror": "^0.0.97", + "@types/enzyme": "^3.10.5", "@types/react-jsonschema-form": "^1.7.4", "@types/react-select": "^3.0.19", "csstype": "^3.0.2", diff --git a/packages/devui/tests/Button.test.js b/packages/devui/tests/Button.test.tsx similarity index 100% rename from packages/devui/tests/Button.test.js rename to packages/devui/tests/Button.test.tsx diff --git a/packages/devui/tests/Container.test.js b/packages/devui/tests/Container.test.tsx similarity index 100% rename from packages/devui/tests/Container.test.js rename to packages/devui/tests/Container.test.tsx diff --git a/packages/devui/tests/ContextMenu.test.js b/packages/devui/tests/ContextMenu.test.tsx similarity index 100% rename from packages/devui/tests/ContextMenu.test.js rename to packages/devui/tests/ContextMenu.test.tsx diff --git a/packages/devui/tests/Dialog.test.js b/packages/devui/tests/Dialog.test.tsx similarity index 100% rename from packages/devui/tests/Dialog.test.js rename to packages/devui/tests/Dialog.test.tsx diff --git a/packages/devui/tests/Editor.test.js b/packages/devui/tests/Editor.test.tsx similarity index 100% rename from packages/devui/tests/Editor.test.js rename to packages/devui/tests/Editor.test.tsx diff --git a/packages/devui/tests/Form.test.js b/packages/devui/tests/Form.test.tsx similarity index 100% rename from packages/devui/tests/Form.test.js rename to packages/devui/tests/Form.test.tsx diff --git a/packages/devui/tests/Notification.test.js b/packages/devui/tests/Notification.test.tsx similarity index 100% rename from packages/devui/tests/Notification.test.js rename to packages/devui/tests/Notification.test.tsx diff --git a/packages/devui/tests/SegmentedControl.test.js b/packages/devui/tests/SegmentedControl.test.tsx similarity index 100% rename from packages/devui/tests/SegmentedControl.test.js rename to packages/devui/tests/SegmentedControl.test.tsx diff --git a/packages/devui/tests/Select.test.js b/packages/devui/tests/Select.test.tsx similarity index 100% rename from packages/devui/tests/Select.test.js rename to packages/devui/tests/Select.test.tsx diff --git a/packages/devui/tests/Slider.test.js b/packages/devui/tests/Slider.test.tsx similarity index 100% rename from packages/devui/tests/Slider.test.js rename to packages/devui/tests/Slider.test.tsx diff --git a/packages/devui/tests/Tabs.test.js b/packages/devui/tests/Tabs.test.tsx similarity index 100% rename from packages/devui/tests/Tabs.test.js rename to packages/devui/tests/Tabs.test.tsx diff --git a/packages/devui/tests/Toolbar.test.js b/packages/devui/tests/Toolbar.test.tsx similarity index 100% rename from packages/devui/tests/Toolbar.test.js rename to packages/devui/tests/Toolbar.test.tsx diff --git a/yarn.lock b/yarn.lock index ac38d00b..b674b430 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3325,6 +3325,13 @@ resolved "https://registry.yarnpkg.com/@types/braces/-/braces-3.0.0.tgz#7da1c0d44ff1c7eb660a36ec078ea61ba7eb42cb" integrity sha512-TbH79tcyi9FHwbyboOKeRachRq63mSuWYXOflsNO9ZyE5ClQ/JaozNKl+aWUq87qPNsXasXxi2AbgfwIJ+8GQw== +"@types/cheerio@*": + version "0.22.21" + resolved "https://registry.yarnpkg.com/@types/cheerio/-/cheerio-0.22.21.tgz#5e37887de309ba11b2e19a6e14cad7874b31a8a3" + integrity sha512-aGI3DfswwqgKPiEOTaiHV2ZPC9KEhprpgEbJnv0fZl3SGX0cGgEva1126dGrMC6AJM6v/aihlUgJn9M5DbDZ/Q== + dependencies: + "@types/node" "*" + "@types/classnames@^2.2.10": version "2.2.10" resolved "https://registry.yarnpkg.com/@types/classnames/-/classnames-2.2.10.tgz#cc658ca319b6355399efc1f5b9e818f1a24bf999" @@ -3381,6 +3388,14 @@ resolved "https://registry.yarnpkg.com/@types/dragula/-/dragula-3.7.0.tgz#62178f21c3896ab9823a33d08ed844ab9af496af" integrity sha512-Scr3lQ7pDmwic+I4qrzDEIfPVGUhc/qo8S0VJJ9v5pzTyIIJzAXrnFajjsMSL8J84VERIkZUh7wH6wYEisY+TA== +"@types/enzyme@^3.10.5": + version "3.10.5" + resolved "https://registry.yarnpkg.com/@types/enzyme/-/enzyme-3.10.5.tgz#fe7eeba3550369eed20e7fb565bfb74eec44f1f0" + integrity sha512-R+phe509UuUYy9Tk0YlSbipRpfVtIzb/9BHn5pTEtjJTF5LXvUjrIQcZvNyANNEyFrd2YGs196PniNT1fgvOQA== + dependencies: + "@types/cheerio" "*" + "@types/react" "*" + "@types/eslint-visitor-keys@^1.0.0": version "1.0.0" resolved "https://registry.yarnpkg.com/@types/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#1ee30d79544ca84d68d4b3cdb0af4f205663dd2d" @@ -9379,7 +9394,7 @@ hmac-drbg@^1.0.0: minimalistic-assert "^1.0.0" minimalistic-crypto-utils "^1.0.1" -hoist-non-react-statics@^3.0.0, hoist-non-react-statics@^3.1.0, hoist-non-react-statics@^3.3.0: +hoist-non-react-statics@^3.0.0, hoist-non-react-statics@^3.1.0, hoist-non-react-statics@^3.3.0, hoist-non-react-statics@^3.3.2: version "3.3.2" resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz#ece0acaf71d62c2969c2ec59feff42a4b1a85b45" integrity sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==