From 77157e17d41b1d3c6545ff4a8ee6b1f7856aec28 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Stephan=20M=C3=BCller?= Date: Fri, 17 Aug 2018 12:35:55 +0200 Subject: [PATCH] mgr/dashboard: Add hints to resolve unit test failures MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Stephan Müller --- src/pybind/mgr/dashboard/HACKING.rst | 9 +++++++++ 1 file changed, 9 insertions(+) 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 ~~~~~~~~~~~~~~~~~~~~~~~~ -- 2.39.5