/
githubmirror
/
Chart.js
Обзор
Документация
Войти
/
githubmirror
/
Chart.js
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
test/specs/core.helpers.tests.js
24 строки
678 B
Jukka Kurkela
Update eslint-config-chartjs to v0.3.0 (#8406)
10 фев 2021, 16:21
Не верифицирован
10 фев 2021, 16:21
ddfbcf7
Код
Авторство
О чём код?
describe('Core helper tests', function() { var helpers; beforeAll(function() { helpers = window.Chart.helpers; }); it('should generate integer ids', function() { var uid = helpers.uid(); expect(uid).toEqual(jasmine.any(Number)); expect(helpers.uid()).toBe(uid + 1); expect(helpers.uid()).toBe(uid + 2); expect(helpers.uid()).toBe(uid + 3); }); describe('clone', function() { it('should not allow prototype pollution', function() { const test = helpers.clone(JSON.parse('{"__proto__":{"polluted": true}}')); expect(test.prototype).toBeUndefined(); expect(Object.prototype.polluted).toBeUndefined(); }); }); });