From b6eec4ded2658e229bf386b4df62b4a99a759b8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tu=C4=9F=C3=A7e=20K=C3=BC=C3=A7=C3=BCko=C4=9Flu?= Date: Mon, 7 Mar 2022 09:31:39 +0300 Subject: [PATCH] re-organize --- .eslintrc.js | 13 +------------ jest.config.js | 5 ++++- .../components/accordion}/Accordion.spec.js | 0 .../unit => src/components/button}/Button.spec.js | 0 .../unit => src/components/dialog}/Dialog.spec.js | 0 .../components/dropdown}/Dropdown.spec.js | 0 .../components/inputtext}/InputText.spec.js | 0 {tests/unit => src/components/tag}/Tag.spec.js | 0 tests/unit/.eslintrc.js | 5 ----- 9 files changed, 5 insertions(+), 18 deletions(-) rename {tests/unit => src/components/accordion}/Accordion.spec.js (100%) rename {tests/unit => src/components/button}/Button.spec.js (100%) rename {tests/unit => src/components/dialog}/Dialog.spec.js (100%) rename {tests/unit => src/components/dropdown}/Dropdown.spec.js (100%) rename {tests/unit => src/components/inputtext}/InputText.spec.js (100%) rename {tests/unit => src/components/tag}/Tag.spec.js (100%) delete mode 100644 tests/unit/.eslintrc.js diff --git a/.eslintrc.js b/.eslintrc.js index df3ff9fb5..69d2fd097 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -13,16 +13,5 @@ module.exports = { rules: { 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off', 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off' - }, - "overrides": [ - { - "files": [ - "**/__tests__/*.{j,t}s?(x)", - "**/tests/unit/**/*.spec.{j,t}s?(x)" - ], - "env": { - "jest": true - } - } - ] + } } \ No newline at end of file diff --git a/jest.config.js b/jest.config.js index c8c81bf69..108d78814 100644 --- a/jest.config.js +++ b/jest.config.js @@ -26,5 +26,8 @@ module.exports = { "^primevue/overlayeventbus(.*)$": "/src/components/overlayeventbus/OverlayEventBus.js", "^primevue/terminalservice(.*)$": "/src/components/terminalservice/TerminalService.js", "^primevue/virtualscroller(.*)$": "/src/components/virtualscroller/VirtualScroller.vue" - } + }, + testMatch: [ + "**/src/components/**/*.spec.{j,t}s?(x)" + ] } \ No newline at end of file diff --git a/tests/unit/Accordion.spec.js b/src/components/accordion/Accordion.spec.js similarity index 100% rename from tests/unit/Accordion.spec.js rename to src/components/accordion/Accordion.spec.js diff --git a/tests/unit/Button.spec.js b/src/components/button/Button.spec.js similarity index 100% rename from tests/unit/Button.spec.js rename to src/components/button/Button.spec.js diff --git a/tests/unit/Dialog.spec.js b/src/components/dialog/Dialog.spec.js similarity index 100% rename from tests/unit/Dialog.spec.js rename to src/components/dialog/Dialog.spec.js diff --git a/tests/unit/Dropdown.spec.js b/src/components/dropdown/Dropdown.spec.js similarity index 100% rename from tests/unit/Dropdown.spec.js rename to src/components/dropdown/Dropdown.spec.js diff --git a/tests/unit/InputText.spec.js b/src/components/inputtext/InputText.spec.js similarity index 100% rename from tests/unit/InputText.spec.js rename to src/components/inputtext/InputText.spec.js diff --git a/tests/unit/Tag.spec.js b/src/components/tag/Tag.spec.js similarity index 100% rename from tests/unit/Tag.spec.js rename to src/components/tag/Tag.spec.js diff --git a/tests/unit/.eslintrc.js b/tests/unit/.eslintrc.js deleted file mode 100644 index 013a195bf..000000000 --- a/tests/unit/.eslintrc.js +++ /dev/null @@ -1,5 +0,0 @@ -module.exports = { - env: { - jest: true - } -} \ No newline at end of file