ctrlplusb / easy-peasy

Vegetarian friendly state for React
https://easy-peasy.dev
MIT License
5.03k stars 190 forks source link

chore: Cleanup log output from tests #789

Closed jmyrland closed 2 years ago

jmyrland commented 2 years ago
vercel[bot] commented 2 years ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
easy-peasy ✅ Ready (Inspect) Visit Preview Oct 31, 2022 at 7:24AM (UTC)
jmyrland commented 2 years ago

Specifically removes this output:

 RUNS  tests/use-store.test.js
  ● Console

    console.log
      Error: error
          at Object.<anonymous> (easy-peasy\tests\effect-on.test.js:381:17)
          at Promise.then.completed (easy-peasy\node_modules\jest-circus\build\utils.js:333:28)
          at new Promise (<anonymous>)
          at callAsyncCircusFn (easy-peasy\node_modules\jest-circus\build\utils.js:259:10)
          at _callCircusTest (easy-peasy\node_modules\jest-circus\build\run.js:277:40)
          at processTicksAndRejections (node:internal/process/task_queues:96:5)
          at _runTest (easy-peasy\node_modules\jest-circus\build\run.js:209:3)
          at _runTestsForDescribeBlock (easy-peasy\node_modules\jest-circus\build\run.js:97:9)
          at _runTestsForDescribeBlock (easy-peasy\node_modules\jest-circus\build\run.js:91:9)
          at run (easy-peasy\node_modules\jest-circus\build\run.js:31:3)
          at runAndTransformResultsToJestFormat (easy-peasy\node_modules\jest-circus\build\legacy-code-todo-rewrite\jestAdapterInit.js:136:21)
          at jestAdapter (easy-peasy\node_modules\jest-circus\build\legacy-code-todo-rewrite\jestAdapter.js:92:19)
          at runTestInternal (easy-peasy\node_modules\jest-runner\build\runTest.js:407:16)
          at runTest (easy-peasy\node_modules\jest-runner\build\runTest.js:491:34)
          at Object.worker (easy-peasy\node_modules\jest-runner\build\testWorker.js:133:12)

And this:

  ● Console

    console.warn
      Invalid storage provider

      46 |       if (process.env.NODE_ENV === 'development') {
      47 |         // eslint-disable-next-line no-console
    > 48 |         console.warn(`Invalid storage provider`);
         |                 ^
      49 |       }
      50 |       storage = noopStorage;
      51 |     }

      at warn (src/persistence.js:48:17)
      at createStorageWrapper (src/persistence.js:117:16)
      at src/extract-data-from-model.js:60:33
          at Array.forEach (<anonymous>)
      at forEach (src/extract-data-from-model.js:42:26)
      at recursiveExtractFromModel (src/extract-data-from-model.js:214:3)
      at bindStoreInternals (src/create-store.js:56:18)
      at bindStoreInternals (src/create-store.js:85:3)
      at sharedMakeStore (tests/persist.test.js:58:3)
      at Object.sharedMakeStore (tests/persist.test.js:184:17)