Commit 2d224dd9 authored by Valentin Hervieu's avatar Valentin Hervieu

chore(coverage): ignore useless lines not directly related to the slider

parent 2e3cdbe2
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
/*global angular: false, console: false, define, module */ /*global angular: false, console: false, define, module */
(function(root, factory) { (function(root, factory) {
'use strict'; 'use strict';
/* istanbul ignore next */
if (typeof define === 'function' && define.amd) { if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module. // AMD. Register as an anonymous module.
define(['angular'], factory); define(['angular'], factory);
...@@ -90,6 +91,7 @@ ...@@ -90,6 +91,7 @@
*/ */
return function(func, wait, options) { return function(func, wait, options) {
'use strict'; 'use strict';
/* istanbul ignore next */
var getTime = (Date.now || function() { var getTime = (Date.now || function() {
return new Date().getTime(); return new Date().getTime();
}); });
...@@ -98,16 +100,13 @@ ...@@ -98,16 +100,13 @@
var previous = 0; var previous = 0;
options = options || {}; options = options || {};
var later = function() { var later = function() {
previous = options.leading === false ? 0 : getTime(); previous = getTime();
timeout = null; timeout = null;
result = func.apply(context, args); result = func.apply(context, args);
context = args = null; context = args = null;
}; };
return function() { return function() {
var now = getTime(); var now = getTime();
if (!previous && options.leading === false) {
previous = now;
}
var remaining = wait - (now - previous); var remaining = wait - (now - previous);
context = this; context = this;
args = arguments; args = arguments;
...@@ -209,7 +208,7 @@ ...@@ -209,7 +208,7 @@
* *
* @type {number} * @type {number}
*/ */
this.step = 0; this.step = 1;
/** /**
* The name of the handle we are currently tracking * The name of the handle we are currently tracking
...@@ -731,7 +730,6 @@ ...@@ -731,7 +730,6 @@
*/ */
updateTicksScale: function() { updateTicksScale: function() {
if (!this.options.showTicks) return; if (!this.options.showTicks) return;
if (!this.step) return; //if step is 0, we'll get a zero division
var positions = '', var positions = '',
ticksCount = Math.round((this.maxValue - this.minValue) / this.step) + 1; ticksCount = Math.round((this.maxValue - this.minValue) / this.step) + 1;
......
This diff is collapsed.
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
/*global angular: false, console: false, define, module */ /*global angular: false, console: false, define, module */
(function(root, factory) { (function(root, factory) {
'use strict'; 'use strict';
/* istanbul ignore next */
if (typeof define === 'function' && define.amd) { if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module. // AMD. Register as an anonymous module.
define(['angular'], factory); define(['angular'], factory);
...@@ -94,6 +95,7 @@ ...@@ -94,6 +95,7 @@
*/ */
return function(func, wait, options) { return function(func, wait, options) {
'use strict'; 'use strict';
/* istanbul ignore next */
var getTime = (Date.now || function() { var getTime = (Date.now || function() {
return new Date().getTime(); return new Date().getTime();
}); });
...@@ -102,16 +104,13 @@ ...@@ -102,16 +104,13 @@
var previous = 0; var previous = 0;
options = options || {}; options = options || {};
var later = function() { var later = function() {
previous = options.leading === false ? 0 : getTime(); previous = getTime();
timeout = null; timeout = null;
result = func.apply(context, args); result = func.apply(context, args);
context = args = null; context = args = null;
}; };
return function() { return function() {
var now = getTime(); var now = getTime();
if (!previous && options.leading === false) {
previous = now;
}
var remaining = wait - (now - previous); var remaining = wait - (now - previous);
context = this; context = this;
args = arguments; args = arguments;
...@@ -213,7 +212,7 @@ ...@@ -213,7 +212,7 @@
* *
* @type {number} * @type {number}
*/ */
this.step = 0; this.step = 1;
/** /**
* The name of the handle we are currently tracking * The name of the handle we are currently tracking
...@@ -735,7 +734,6 @@ ...@@ -735,7 +734,6 @@
*/ */
updateTicksScale: function() { updateTicksScale: function() {
if (!this.options.showTicks) return; if (!this.options.showTicks) return;
if (!this.step) return; //if step is 0, we'll get a zero division
var positions = '', var positions = '',
ticksCount = Math.round((this.maxValue - this.minValue) / this.step) + 1; ticksCount = Math.round((this.maxValue - this.minValue) / this.step) + 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment