X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=auto_tests%2Ftests%2Fplugins_legend.js;h=29fcb03912db2333f357f8e0508d3d0c50ba2b45;hb=89fdcedbda6906d90e15d84285c4f6c0b8d96d28;hp=3288329fc60c1169be9782559b44847193334d50;hpb=319d0361d2e512ed8049dfedffd79254e491201c;p=dygraphs.git diff --git a/auto_tests/tests/plugins_legend.js b/auto_tests/tests/plugins_legend.js index 3288329..29fcb03 100644 --- a/auto_tests/tests/plugins_legend.js +++ b/auto_tests/tests/plugins_legend.js @@ -3,16 +3,16 @@ * * @author akiya.mizukoshi@gmail.com (Akiyah) */ -var pluginsLegendTestCase = TestCase("plugins-legend"); +describe("plugins-legend", function() { -pluginsLegendTestCase.prototype.setUp = function() { +beforeEach(function() { document.body.innerHTML = "
"; -}; +}); -pluginsLegendTestCase.prototype.tearDown = function() { -}; +afterEach(function() { +}); -pluginsLegendTestCase.prototype.testLegendEscape = function() { +it('testLegendEscape', function() { var opts = { width: 480, height: 320 @@ -41,6 +41,8 @@ pluginsLegendTestCase.prototype.testLegendEscape = function() { legendPlugin.select(e); var legendSpan = $(legendPlugin.legend_div_).find("span b span"); - assertEquals("<script>alert('XSS')</script>", legendSpan.html()); -}; + assert.equal("<script>alert('XSS')</script>", legendSpan.html()); +}); + +});