From: Stephan Müller Date: Fri, 17 Aug 2018 10:35:55 +0000 (+0200) Subject: mgr/dashboard: Add hints to resolve unit test failures X-Git-Tag: v14.0.1~423^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=77157e17d41b1d3c6545ff4a8ee6b1f7856aec28;p=ceph.git mgr/dashboard: Add hints to resolve unit test failures Signed-off-by: Stephan Müller --- diff --git a/src/pybind/mgr/dashboard/HACKING.rst b/src/pybind/mgr/dashboard/HACKING.rst index d7e3cb0f221ea..df41408f90689 100644 --- a/src/pybind/mgr/dashboard/HACKING.rst +++ b/src/pybind/mgr/dashboard/HACKING.rst @@ -72,6 +72,7 @@ To use this plugin you can either install it in your IDE, if supported, or use it via the cli. We added 2 npm scripts to help running prettier commands: + - ``npm run prettier``, will run prettier formatter on all frontend files - ``npm run prettier:lint``, will check all frontend files against prettier linter @@ -85,6 +86,14 @@ Create ``unit-test-configuration.ts`` file based on Run ``npm run test`` to execute the unit tests via `Jest `_. +If you get errors on all tests, it could be because `Jest +`_ or something else was updated. +There are a few ways how you can try to resolve this: + +- Remove all modules with ``rm -rf dist node_modules`` and run ``npm install`` + again in order to reinstall them +- Clear the cache of jest by running ``npx jest --clearCache`` + Running End-to-End Tests ~~~~~~~~~~~~~~~~~~~~~~~~