Я пытаюсь протестировать компонент и увидел, что этот тест не удался, и я не мог понять, почему тест завершился неудачей на совершенно не связанном компоненте.
at Object.<anonymous> (src/screens/cook/restaurant/create/submit-button/submit-button.tsx:70:23)
at Object.<anonymous> (src/screens/cook/restaurant/create/submit-button/index.ts:1:1)
at Object.<anonymous> (src/screens/cook/restaurant/create/form.tsx:9:1)
at Object.<anonymous> (src/screens/cook/restaurant/create/layout.tsx:4:1)
at Object.<anonymous> (src/screens/cook/restaurant/create/container.tsx:7:1)
at Object.<anonymous> (src/screens/cook/restaurant/api/index.ts:14:1)
at Object.<anonymous> (src/screens/home/sections/subscribe.tsx:13:1)
at Object.<anonymous> (src/screens/home/sections/index.ts:3:1)
at Object.<anonymous> (src/screens/home/layout.tsx:4:1)
at Object.<anonymous> (src/screens/home/container.tsx:2:1)
at Object.<anonymous> (src/screens/routes.tsx:13:1)
at Object.<anonymous> (src/App.tsx:9:1)
at Object.<anonymous> (src/components/reserved-events-card/card-body.tsx:11:1)
at Object.<anonymous> (src/components/reserved-events-card/card-content.tsx:3:1)
at Object.<anonymous> (src/components/reserved-events-card/layout.tsx:6:1)
at Object.<anonymous> (src/components/reserved-events-card/container.tsx:4:1)
at Object.<anonymous> (src/components/reserved-events-card/index.ts:1:1)
at Object.<anonymous> (src/components/index.ts:12:1)
at Object.<anonymous> (src/screens/cook/summary/incomplete-events/incomplete-table.tsx:6:1)
at Object.<anonymous> (src/screens/cook/summary/incomplete-events/index.ts:7:1)
at Object.<anonymous> (src/screens/cook/summary/layout.tsx:6:1)
at Object.<anonymous> (src/screens/cook/summary/container.tsx:4:1)
at Object.<anonymous> (src/screens/cook/summary/__tests__/summary.container.test.tsx:8:1)
Как вы можете видеть, трассировка возвращается обратно к моему входному файлу, а затем к месту возникновения ошибки.
submit-button
компонент не используется нигде в пределах summary.container.