*
* @author akiya.mizukoshi@gmail.com (Akiyah)
*/
-var pluginsLegendTestCase = TestCase("plugins-legend");
+describe("plugins-legend", function() {
-pluginsLegendTestCase.prototype.setUp = function() {
+beforeEach(function() {
document.body.innerHTML = "<div id='graph'></div>";
-};
+});
-pluginsLegendTestCase.prototype.tearDown = function() {
-};
+afterEach(function() {
+});
-pluginsLegendTestCase.prototype.testLegendEscape = function() {
+it('testLegendEscape', function() {
var opts = {
width: 480,
height: 320
}
legendPlugin.select(e);
- var legendSpan = $(legendPlugin.legend_div_).find("span b span");
- assertEquals("<script>alert('XSS')</script>", legendSpan.html());
-};
+ var legendSpan = legendPlugin.legend_div_.querySelector("span b span");
+ assert.equal(legendSpan.innerHTML, "<script>alert('XSS')</script>");
+});
+
+});