Merge pull request #565 from danvk/gulp
[dygraphs.git] / auto_tests / tests / smooth_plotter.js
index 2268bb3..41b0f5d 100644 (file)
@@ -3,43 +3,45 @@
  *
  * @author danvdk@gmail.com (Dan Vanderkam)
  */
-var smoothPlotterTestCase = TestCase("smooth-plotter");
+describe("smooth-plotter", function() {
 
 var getControlPoints = smoothPlotter._getControlPoints;
 
-smoothPlotterTestCase.prototype.setUp = function() {
-};
+beforeEach(function() {
+});
 
-smoothPlotterTestCase.prototype.tearDown = function() {
-};
+afterEach(function() {
+});
 
-smoothPlotterTestCase.prototype.testNoSmoothing = function() {
+it('testNoSmoothing', function() {
   var lastPt = {x: 10, y: 0},
       pt = {x: 11, y: 1},
       nextPt = {x: 12, y: 0},
       alpha = 0;
 
-  assertEquals([11, 1, 11, 1], getControlPoints(lastPt, pt, nextPt, alpha));
-};
+  assert.deepEqual([11, 1, 11, 1], getControlPoints(lastPt, pt, nextPt, alpha));
+});
 
-smoothPlotterTestCase.prototype.testHalfSmoothing = function() {
+it('testHalfSmoothing', function() {
   var lastPt = {x: 10, y: 0},
       pt = {x: 11, y: 1},
       nextPt = {x: 12, y: 0},
       alpha = 0.5;
 
-  assertEquals([10.5, 1, 11.5, 1], getControlPoints(lastPt, pt, nextPt, alpha));
-}
+  assert.deepEqual([10.5, 1, 11.5, 1], getControlPoints(lastPt, pt, nextPt, alpha));
+});
 
-smoothPlotterTestCase.prototype.testExtrema = function() {
+it('testExtrema', function() {
   var lastPt = {x: 10, y: 0},
       pt = {x: 11, y: 1},
       nextPt = {x: 12, y: 1},
       alpha = 0.5;
 
-  assertEquals([10.5, 0.75, 11.5, 1.25],
+  assert.deepEqual([10.5, 0.75, 11.5, 1.25],
                getControlPoints(lastPt, pt, nextPt, alpha, true));
 
-  assertEquals([10.5, 1, 11.5, 1],
+  assert.deepEqual([10.5, 1, 11.5, 1],
                getControlPoints(lastPt, pt, nextPt, alpha, false));
-}
+});
+
+});