File: vendors/chart.js/test/core.scaleService.tests.js

Recommend this page to a friend!
  Classes of Jorge Castro  >  Gentelella BladeOne  >  vendors/chart.js/test/core.scaleService.tests.js  >  Download  
File: vendors/chart.js/test/core.scaleService.tests.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Gentelella BladeOne
Render templates using Bootstrap for presentation
Author: By
Last change:
Date: 2 months ago
Size: 737 bytes
 

Contents

Class file image Download
// Tests of the scale service
describe('Test the scale service', function() {

	it('should update scale defaults', function() {
		var defaults = {
			testProp: true
		};
		var type = 'my_test_type';
		var Constructor = function() {
			this.initialized = true;
		};
		Chart.scaleService.registerScaleType(type, Constructor, defaults);

		// Should equal defaults but not be an identical object
		expect(Chart.scaleService.getScaleDefaults(type)).toEqual(jasmine.objectContaining({
			testProp: true
		}));
		
		Chart.scaleService.updateScaleDefaults(type, {
			testProp: 'red',
			newProp: 42
		});

		expect(Chart.scaleService.getScaleDefaults(type)).toEqual(jasmine.objectContaining({
			testProp: 'red',
			newProp: 42
		}));
	});
});

For more information send a message to info at phpclasses dot org.