Document each parameter of valueFormatter
[dygraphs.git] / auto_tests / tests / utils_test.js
index 39e60d2..5bd7f8d 100644 (file)
@@ -171,6 +171,19 @@ UtilsTestCase.prototype.testIterator_no_args = function() {
   assertNull(iter.next());
 };
 
+UtilsTestCase.prototype.testToRGB = function() {
+  assertEquals({r: 255, g: 200, b: 150}, Dygraph.toRGB_('rgb(255,200,150)'));
+  assertEquals({r: 255, g: 200, b: 150}, Dygraph.toRGB_('#FFC896'));
+  assertEquals({r: 255, g: 0, b: 0}, Dygraph.toRGB_('red'));
+};
+
+UtilsTestCase.prototype.testIsPixelChangingOptionList = function() {
+  var isPx = Dygraph.isPixelChangingOptionList;
+  assertTrue(isPx([], { axes: { y: { digitsAfterDecimal: 3 }}}));
+  assertFalse(isPx([], { axes: { y: { axisLineColor: 'blue' }}}));
+};
+
+/*
 UtilsTestCase.prototype.testDateSet = function() {
   var base = new Date(1383455100000);
   var d = new Date(base);
@@ -184,3 +197,4 @@ UtilsTestCase.prototype.testDateSet = function() {
   Dygraph.setDateSameTZ(d, {ms: 10});
   assertEquals(10, d.getTime() - base.getTime());
 };
+*/