mwood23 / slate-test-utils

A toolkit to test Slate rich text editors with Jest, React Testing Library, and hyperscript! Write user driven integration tests with ease.
MIT License
57 stars 6 forks source link

Cannot find module 'lodash.clonedeep' from 'node_modules/slate-test-utils/dist/cjs/ensureSlateValid.js' #7

Closed rzachariah closed 2 years ago

rzachariah commented 2 years ago

I tried cloning your example, basically as is, and I'm getting errors on npm test.

eg

npm test

> slate-example@0.0.0 test
> jest --verbose

 FAIL  src/tests/ensure-valid.test.tsx
  ● Test suite failed to run

    Cannot find module 'lodash.clonedeep' from 'node_modules/slate-test-utils/dist/cjs/ensureSlateValid.js'

    Require stack:
      node_modules/slate-test-utils/dist/cjs/ensureSlateValid.js
      node_modules/slate-test-utils/dist/cjs/buildTestHarness.js
      node_modules/slate-test-utils/dist/cjs/index.js
      src/tests/ensure-valid.test.tsx

      at Resolver.resolveModule (node_modules/jest-resolve/build/resolver.js:324:11)
      at Object.<anonymous> (node_modules/slate-test-utils/dist/cjs/ensureSlateValid.js:5:28)

You can find an example repo here. https://github.com/rzachariah/slate-example

mwood23 commented 2 years ago

@rzachariah Thanks for opening. Had that dep as a devDependency accidentally. Just published 1.3.1 where it's be fixed! Commit: https://github.com/mwood23/slate-test-utils/commit/93e26f2bdde43e5185a39f46d19538164b3e1d8b. Lemme know if you run into any else.