Software: Apache. PHP/5.6.40 uname -a: Linux cpanel06wh.bkk1.cloud.z.com 2.6.32-954.3.5.lve1.4.80.el6.x86_64 #1 SMP Thu Sep 24 uid=851(cp949260) gid=853(cp949260) groups=853(cp949260) Safe-mode: OFF (not secure) /home/cp949260/public_html/phbcoop.com/phb_admin/bower_components/chart.js/test/specs/ drwxr-xr-x |
Viewing file: Select action/file-type: 'use strict'; describe('Chart.helpers.canvas', function() { var helpers = Chart.helpers; describe('clear', function() { it('should clear the chart canvas', function() { var chart = acquireChart({}, { canvas: { style: 'width: 150px; height: 245px' } }); spyOn(chart.ctx, 'clearRect'); helpers.canvas.clear(chart); expect(chart.ctx.clearRect.calls.count()).toBe(1); expect(chart.ctx.clearRect.calls.first().object).toBe(chart.ctx); expect(chart.ctx.clearRect.calls.first().args).toEqual([0, 0, 150, 245]); }); }); describe('roundedRect', function() { it('should create a rounded rectangle path', function() { var context = window.createMockContext(); helpers.canvas.roundedRect(context, 10, 20, 30, 40, 5); expect(context.getCalls()).toEqual([ {name: 'moveTo', args: [15, 20]}, {name: 'lineTo', args: [35, 20]}, {name: 'quadraticCurveTo', args: [40, 20, 40, 25]}, {name: 'lineTo', args: [40, 55]}, {name: 'quadraticCurveTo', args: [40, 60, 35, 60]}, {name: 'lineTo', args: [15, 60]}, {name: 'quadraticCurveTo', args: [10, 60, 10, 55]}, {name: 'lineTo', args: [10, 25]}, {name: 'quadraticCurveTo', args: [10, 20, 15, 20]} ]); }); it('should optimize path if radius is 0', function() { var context = window.createMockContext(); helpers.canvas.roundedRect(context, 10, 20, 30, 40, 0); expect(context.getCalls()).toEqual([{name: 'rect', args: [10, 20, 30, 40]}]); }); }); }); |
:: Command execute :: | |
--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by KaizenLouie | C99Shell Github | Generation time: 0.0105 ]-- |