%PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
| Server IP : 14.207.165.8 / Your IP : 216.73.217.17 Web Server : Apache/2.4.18 (Ubuntu) System : Linux 246 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64 User : root ( 0) PHP Version : 7.0.33-0ubuntu0.16.04.16 Disable Function : exec,passthru,shell_exec,system,proc_open,popen,pcntl_exec MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/html/ppaobm/vendor/bower-asset/chartjs/test/specs/ |
Upload File : |
// Test the core element functionality
describe('Core element tests', function() {
it ('should transition model properties', function() {
var element = new Chart.Element({
_model: {
numberProp: 0,
numberProp2: 100,
_underscoreProp: 0,
stringProp: 'abc',
objectProp: {
myObject: true
},
colorProp: 'rgb(0, 0, 0)'
}
});
// First transition clones model into view
element.transition(0.25);
expect(element._view).toEqual(element._model);
expect(element._view.objectProp).toBe(element._model.objectProp); // not cloned
element._model.numberProp = 100;
element._model.numberProp2 = 250;
element._model._underscoreProp = 200;
element._model.stringProp = 'def';
element._model.newStringProp = 'newString';
element._model.colorProp = 'rgb(255, 255, 0)';
element.transition(0.25);
expect(element._view).toEqual({
numberProp: 25,
numberProp2: 137.5,
_underscoreProp: 0, // underscore props are not transition to a new value
stringProp: 'def',
newStringProp: 'newString',
objectProp: {
myObject: true
},
colorProp: 'rgb(64, 64, 0)',
});
});
});