Add div warraper for the open in a new window checkbox and discription in order to...
[openemr.git] / public / assets / Chart.js-2-1-3 / test / core.scaleService.tests.js
blobca0eaf20d6c700cad3881382e8bee0abc407ea26
1 // Tests of the scale service
2 describe('Test the scale service', function() {
4         it('should update scale defaults', function() {
5                 var defaults = {
6                         testProp: true
7                 };
8                 var type = 'my_test_type';
9                 var Constructor = function() {
10                         this.initialized = true;
11                 };
12                 Chart.scaleService.registerScaleType(type, Constructor, defaults);
14                 // Should equal defaults but not be an identical object
15                 expect(Chart.scaleService.getScaleDefaults(type)).toEqual(jasmine.objectContaining({
16                         testProp: true
17                 }));
18                 
19                 Chart.scaleService.updateScaleDefaults(type, {
20                         testProp: 'red',
21                         newProp: 42
22                 });
24                 expect(Chart.scaleService.getScaleDefaults(type)).toEqual(jasmine.objectContaining({
25                         testProp: 'red',
26                         newProp: 42
27                 }));
28         });
29 });