[feature] react-auth test init
TFK70 opened this issue · comments
С чем связан запрос на фичу?
Необходимо протестировать работоспособность плагина react-auth после обновления зависимостей.
Расскажите как вы это себе видите
- В директории с плагином создать папку tests
- В папку tests положить сам файл с тестом
- Название файла с тестом: react-auth.test.tsx
Лог об ошибке
✖ jest --config /home/darius/reactjs/node_modules/@monstrs/jest-config/dist/index.js --bail --findRelatedTests found some errors. Please fix them and try committing again.
ts-jest[config] (WARN) The option tsConfig
is deprecated and will be removed in ts-jest 27, use tsconfig
instead
FAIL packages/react-auth/tests/react-auth.test.tsx
● Test suite failed to run
Your test suite must contain at least one test.
at onResult (node_modules/@jest/core/build/TestScheduler.js:175:18)
at node_modules/@jest/core/build/TestScheduler.js:304:17
at node_modules/emittery/index.js:260:13
at Array.map (<anonymous>)
at Emittery.Typed.emit (node_modules/emittery/index.js:258:23)
Test Suites: 1 failed, 1 total
Tests: 0 total
Snapshots: 0 total
Time: 0.767 s
Ran all test suites related to files matching //home/darius/reactjs/packages/react-auth/tests/react-auth.test.tsx|/home/darius/reactjs/packages/react-auth/jest.config.js/i.
husky > pre-commit hook failed (add --no-verify to bypass)
/home/darius/reactjs/node_modules/commitizen/dist/cli/strategies/git-cz.js:85
throw error;
^
Error: git exited with error code 1
at ChildProcess. (/home/darius/reactjs/node_modules/commitizen/dist/git/commit.js:807:28)
at ChildProcess.emit (events.js:315:20)
at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12) {
code: 1,
signal: null
}
error Command failed with exit code 1.
mctl test сдох, пора переписывать
Используй стандартный раннер jest'a
✖ eslint --fix --config /home/darius/Desktop/reactjs/node_modules/@monstrs/eslint-config/dist/index.js found some errors. Please fix them and try committing again.
/home/darius/Desktop/reactjs/packages/react-auth/tests/react-auth.test.tsx
1:1 error 'enzyme-adapter-react-16' should be listed in the project's dependencies. Run 'npm i -S enzyme-adapter-react-16' to add it import/no-extraneous-dependencies
3:1 error 'enzyme' should be listed in the project's dependencies. Run 'npm i -S enzyme' to add it import/no-extraneous-dependencies
9:46 warning Unexpected unnamed function func-names
10:84 warning Unexpected unnamed function func-names
24:66 warning Unexpected unnamed function func-names
38:67 warning Unexpected unnamed function func-names
✖ 6 problems (2 errors, 4 warnings)
husky > pre-commit hook failed (add --no-verify to bypass)
/home/darius/Desktop/reactjs/node_modules/commitizen/dist/cli/strategies/git-cz.js:85
throw error;
^
Error: git exited with error code 1
at ChildProcess. (/home/darius/Desktop/reactjs/node_modules/commitizen/dist/git/commit.js:807:28)
at ChildProcess.emit (events.js:315:20)
at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12) {
code: 1,
signal: null
}
error Command failed with exit code 1.