Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests fail to run #11

Closed
philvarner opened this issue Feb 13, 2023 · 0 comments
Closed

Tests fail to run #11

philvarner opened this issue Feb 13, 2023 · 0 comments

Comments

@philvarner
Copy link

philvarner commented Feb 13, 2023

npm run test

 FAIL  src/components/LeafMap/LeafMap.test.js
  ● Test suite failed to run

    Cannot find module 'react-leaflet/MapContainer' from 'src/components/LeafMap/LeafMap.js'

    Require stack:
      src/components/LeafMap/LeafMap.js
      src/components/LeafMap/LeafMap.test.js

       7 | import { setMap } from '../../redux/slices/mainSlice'
       8 |
    >  9 | import { MapContainer } from 'react-leaflet/MapContainer'
         | ^
      10 | import { TileLayer } from 'react-leaflet/TileLayer'
      11 |
      12 | const LeafMap = () => {

      at Resolver.resolveModule (node_modules/jest-resolve/build/resolver.js:324:11)
      at Object.<anonymous> (src/components/LeafMap/LeafMap.js:9:1)
      at Object.<anonymous> (src/components/LeafMap/LeafMap.test.js:4:1)

 FAIL  src/App.test.js
  ● Test suite failed to run

    Cannot find module 'react-leaflet/MapContainer' from 'src/components/LeafMap/LeafMap.js'

    Require stack:
      src/components/LeafMap/LeafMap.js
      src/components/Layout/Content/BottomContent/BottomContent.js
      src/components/Layout/Content/Content.js
      src/App.js
      src/App.test.js

       7 | import { setMap } from '../../redux/slices/mainSlice'
       8 |
    >  9 | import { MapContainer } from 'react-leaflet/MapContainer'
         | ^
      10 | import { TileLayer } from 'react-leaflet/TileLayer'
      11 |
      12 | const LeafMap = () => {

      at Resolver.resolveModule (node_modules/jest-resolve/build/resolver.js:324:11)
      at Object.<anonymous> (src/components/LeafMap/LeafMap.js:9:1)
      at Object.<anonymous> (src/components/Layout/Content/BottomContent/BottomContent.js:3:1)
      at Object.<anonymous> (src/components/Layout/Content/Content.js:3:1)
      at Object.<anonymous> (src/App.js:5:1)
      at Object.<anonymous> (src/App.test.js:3:1)

 FAIL  src/components/Search/Search.test.js
  ● Test suite failed to run

    TypeError: (0 , _react2.describe) is not a function

      4 | import Search from './Search'
      5 |
    > 6 | describe('<Search />', () => {
        |         ^
      7 |   test('it should mount', () => {
      8 |     render(<Search />)
      9 |

      at Object.<anonymous> (src/components/Search/Search.test.js:6:9)

Test Suites: 3 failed, 3 total
Tests:       0 total
Snapshots:   0 total
Time:        1.411 s
Ran all test suites.

@philvarner philvarner mentioned this issue Feb 13, 2023
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant