juliancwirko / react-s-alert

Alerts / Notifications for React with rich configuration options
https://www.npmjs.com/package/react-s-alert
MIT License
649 stars 75 forks source link

Add missing enzyme dependencies to run tests #40

Closed khardenstine closed 7 years ago

khardenstine commented 7 years ago

This fixes the errors when running npm test:

react-dom@15.5+ and react-test-renderer are implicit dependencies when usingreact@15.5+ with enzyme. Please add the appropriate version to yourdevDependencies. See https://github.com/airbnb/enzyme#installation
./react-s-alert/node_modules/enzyme/build/react-compat.js:154
      throw e;
      ^

Error: Cannot find module 'react-addons-test-utils'
    at Function.Module._resolveFilename (module.js:470:15)
    at Function.Module._load (module.js:418:25)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    ...

From enzyme docs: If you are using React >=15.5, in addition to enzyme, you will have to ensure that you also have the following npm modules installed if they were not already:

npm i --save-dev react-test-renderer react-dom

juliancwirko commented 7 years ago

thanks!