Project

General

Profile

Bug #24940

mgr/dashboard: How to interactively debug frontend unit tests

Added by Volker Theile 5 months ago. Updated 5 months ago.

Status:
New
Priority:
Normal
Assignee:
Category:
dashboard/general
Target version:
Start date:
07/16/2018
Due date:
% Done:

0%

Source:
Development
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:

Description

I'm missing a documentation and maybe jest configuration to interactively debug frontend unit tests.

History

#1 Updated by Tiago Melo 5 months ago

I have been using the VS Code plugin to debug the tests.
When I want to debug a test it will run the following command:

cd ~/workspace/ceph/src/pybind/mgr/dashboard/frontend ; env "CI=vscode-jest-tests" ~/.nvm/versions/node/v8.11.3/bin/node --inspect-brk=21089 node_modules/jest/bin/jest.js --runInBand dashboard.service.spec.ts --testNamePattern "should call getHealth" 
Debugger listening on ws://127.0.0.1:21089/fa93aab8-641c-4ef0-b638-8430f5a1c50e
For help see https://nodejs.org/en/docs/inspector
Debugger attached.

Also available in: Atom PDF