/
githubmirror
/
components
Обзор
Документация
Войти
/
githubmirror
/
components
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/cdk/coercion/element.spec.ts
13 строк
432 B
Kristiyan Kostadinov
refactor: add utility for coercing element refs (#14258)
19 дек 2018, 18:13
19 дек 2018, 18:13
2463200
Код
Авторство
О чём код?
import {ElementRef} from '@angular/core'; import {coerceElement} from './element'; describe('coerceElement', () => { it('should coerce an ElementRef into an element', () => { const ref = new ElementRef(document.body); expect(coerceElement(ref)).toBe(document.body); }); it('should return the element, if a native element is passed in', () => { expect(coerceElement(document.body)).toBe(document.body); }); });