(
options: {
encapsulation?: ViewEncapsulation;
preserveWhitespaces?: boolean;
selector?: string;
} = {},
)
| 81 | |
| 82 | describe('options', () => { |
| 83 | function createComponentAndModule( |
| 84 | options: { |
| 85 | encapsulation?: ViewEncapsulation; |
| 86 | preserveWhitespaces?: boolean; |
| 87 | selector?: string; |
| 88 | } = {}, |
| 89 | ) { |
| 90 | @Component({ |
| 91 | selector: options.selector || 'my-app', |
| 92 | // styles must be non-empty to trigger `ViewEncapsulation.Emulated` |
| 93 | styles: 'span {color:red}', |
| 94 | template: '<span>a b</span>', |
| 95 | encapsulation: options.encapsulation, |
| 96 | preserveWhitespaces: options.preserveWhitespaces, |
| 97 | jit: true, |
| 98 | standalone: false, |
| 99 | }) |
| 100 | class TestComponent {} |
| 101 | |
| 102 | @NgModule({ |
| 103 | imports: [BrowserModule], |
| 104 | declarations: [TestComponent], |
| 105 | bootstrap: [TestComponent], |
| 106 | jit: true, |
| 107 | }) |
| 108 | class TestModule {} |
| 109 | |
| 110 | return TestModule; |
| 111 | } |
| 112 | |
| 113 | it( |
| 114 | 'should use ViewEncapsulation.Emulated as default', |
no outgoing calls
no test coverage detected
searching dependent graphs…