[Gestures] Tests

Created initialization of variables
and components to MCTChart additions.
This commit is contained in:
Shivam Dave 2015-09-04 12:54:35 -07:00
parent 8920b5454b
commit 4e44571819
2 changed files with 27 additions and 3 deletions

View File

@ -22,15 +22,38 @@
/*global define,Promise,describe,it,expect,xit,beforeEach,waitsFor,jasmine*/
define(
["../src/directives/MCTChart"],
["../../src/directives/MCTChart"],
function (MCTChart) {
"use strict";
describe("The MCT Chart directive", function () {
var mockScope;
var mockInterval,
mockLog,
mockAgentService,
mockScope,
mockElement,
mockCanvas,
mctChart;
beforeEach(function () {
mockInterval =
jasmine.createSpyObj("$interval", [ "cancel" ]);
mockLog = jasmine.createSpyObj("$log", [ "warn" ]);
mockAgentService = jasmine.createSpyObj("agentService", ["isMobile"]);
mockCanvas = jasmine.createSpyObj("canvas", [ "getContext", "addEventListener" ]);
mockScope =
jasmine.createSpyObj("$scope", [ "$on", "$watch", "series", "viewport", "rectangles" ]);
mockElement =
jasmine.createSpyObj("$element", [ "find" ]);
mctChart = new MCTChart(mockInterval, mockAgentService);
});
it("Calls", function() {
mockElement.find.andReturn([mockCanvas]);
//mctChart.link(mockScope, mockElement);
});
});
}

View File

@ -1,4 +1,5 @@
[
"controllers/PlotController"
"controllers/PlotController",
"directives/MCTChart"
]