/
githubmirror
/
amphtml
Обзор
Документация
Войти
/
githubmirror
/
amphtml
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
test/unit/polyfills/test-object-values.js
19 строк
594 B
Kristofer Baxter
♻️ Remove Notice from JS and Markdown (#35717)
19 авг 2021, 21:21
Не верифицирован
19 авг 2021, 21:21
f564b7e
Код
Авторство
О чём код?
import {values} from '#polyfills/object-values'; describes.sandboxed('Object.values', {}, () => { it('should disallow null and undefined', () => { expect(() => values(null)).to.throw(); expect(() => values(undefined)).to.throw(); }); it('should allow primitives', () => { expect(values(1)).to.deep.equal([]); expect(values('A')).to.deep.equal(['A']); expect(values(true)).to.deep.equal([]); expect(values(false)).to.deep.equal([]); }); it('should return values of objects', () => { expect(values({a: 1, b: 2, c: 1})).to.deep.equal([1, 2, 1]); }); });