]> git.proxmox.com Git - ceph.git/blob - ceph/src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/sanitize-html.pipe.spec.ts
import ceph 15.2.14
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / src / app / shared / pipes / sanitize-html.pipe.spec.ts
1 import { TestBed } from '@angular/core/testing';
2 import { DomSanitizer } from '@angular/platform-browser';
3
4 import { configureTestBed } from '../../../testing/unit-test-helper';
5 import { SanitizeHtmlPipe } from '../pipes/sanitize-html.pipe';
6
7 describe('SanitizeHtmlPipe', () => {
8 let pipe: SanitizeHtmlPipe;
9 let domSanitizer: DomSanitizer;
10
11 configureTestBed({
12 providers: [DomSanitizer]
13 });
14
15 beforeEach(() => {
16 domSanitizer = TestBed.get(DomSanitizer);
17 pipe = new SanitizeHtmlPipe(domSanitizer);
18 });
19
20 it('create an instance', () => {
21 expect(pipe).toBeTruthy();
22 });
23
24 // There is no way to inject a working DomSanitizer in unit tests,
25 // so it is not possible to test the `transform` method.
26 });