File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44
55This module allows you to pretty print the inner HTML
66of ` ComponentFixtures ` , ` DebugElements ` , ` NativeElements ` or even plain HTML ` strings ` to the console.
7+ ** This is very useful for debugging Angular component tests in Jest**
8+
9+ ![ logNgHTML] ( https://raw.githubusercontent.com/angular-extensions/pretty-html-log/master/images/before-after.png )
710
811## Getting started
912
@@ -15,8 +18,11 @@ npm i -D @angular-extensions/pretty-html-log
1518```
1619
1720This module is best used with Angular and Jest. Create a
18- ` setupJest.ts ` file in your ` src ` directory and import
19- ` @angular-extension/pretty-html-log ` .
21+ ` setupJest.ts ` file in your ` src ` directory and add the following line:
22+
23+ ```
24+ import @angular-extension/pretty-html-log
25+ ```
2026
2127This import adds a ` logNgHTML ` method to your console. You can then
2228use this method during tests to pretty print ` ComponentFixtures ` ,
You can’t perform that action at this time.
0 commit comments