Unit test debugging in Angular template #202

Closed
opened 2025-08-09 17:15:23 +00:00 by fergalmoran · 0 comments
Owner

Originally created by @jhaacke on 1/28/2018

The Angular template has been a big help but there is one issue I haven't been able to get past when attempting to debug unit tests from the Chrome browser that gets launched by the karma test runner.

After creating a new project from the Angular template, I do the following:

  • Enter "npm test" at the command line. This successfully creates the bundles, executes unit tests, and launches the Chrome browser;

  • From the Chrome browser, click the "Debug" button. This opens the "Karma DEBUG RUNNER" page;

  • On that page, hit Ctrl+Shift+I to open Dev Tools;

  • Click on the Sources tab and hit Ctrl+P to find my unit test file to debug into.

From here my unit test files, such as "counter.component.spec.ts", are not available in the search box. Does the template configuration need to be modified in order to debug into the unit test files?

*Originally created by @jhaacke on 1/28/2018* The Angular template has been a big help but there is one issue I haven't been able to get past when attempting to debug unit tests from the Chrome browser that gets launched by the karma test runner. After creating a new project from the Angular template, I do the following: - Enter "npm test" at the command line. This successfully creates the bundles, executes unit tests, and launches the Chrome browser; - From the Chrome browser, click the "Debug" button. This opens the "Karma DEBUG RUNNER" page; - On that page, hit Ctrl+Shift+I to open Dev Tools; - Click on the Sources tab and hit Ctrl+P to find my unit test file to debug into. From here my unit test files, such as "counter.component.spec.ts", are not available in the search box. Does the template configuration need to be modified in order to debug into the unit test files?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/JavaScriptServices#202
No description provided.