techno-tim / littlelink-server

A lightweight, open source, stateless, and self-hosted alternative to linktree in a Docker container!
https://links.technotim.live
MIT License
901 stars 164 forks source link

JS Test - Deprecation Warning #152

Closed timothystewart6 closed 1 year ago

timothystewart6 commented 2 years ago

Looks like we need to fix parts of the API that are being deprecated in react 18

https://github.com/techno-tim/littlelink-server/runs/7006518148?check_suite_focus=true

PASS src/components/Sort/__test__/Sort.test.js
  ● Console
    console.error
      Warning: ReactDOM.render is no longer supported in React 18. Use createRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot
      22 |
      23 |   test('renders without exploding', () => {
    > 24 |     render(<Sort />, container);
         |     ^
      [25](https://github.com/techno-tim/littlelink-server/runs/7006518148?check_suite_focus=true#step:4:26) |   });
      [26](https://github.com/techno-tim/littlelink-server/runs/7006518148?check_suite_focus=true#step:4:27) |
      [27](https://github.com/techno-tim/littlelink-server/runs/7006518148?check_suite_focus=true#step:4:28) |   test('Sorts Buttons by order', () => {
      at printWarning (node_modules/react-dom/cjs/react-dom.development.js:86:30)
      at error (node_modules/react-dom/cjs/react-dom.development.js:60:7)
      at render (node_modules/react-dom/cjs/react-dom.development.js:[29](https://github.com/techno-tim/littlelink-server/runs/7006518148?check_suite_focus=true#step:4:30)670:5)
      at Object.<anonymous> (src/components/Sort/__test__/Sort.test.js:24:5)
timothystewart6 commented 1 year ago

this was fixed by https://github.com/techno-tim/littlelink-server/commit/8ec1969fd1673d670a4d0882e46661433cedcf8c