X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=auto_tests%2Ftests%2Fdygraph-options-tests.js;h=ded9ee3ebdb25c51bb65fb77d048fdcb31268ceb;hb=refs%2Fheads%2Fopt-size-check;hp=4311fb5fa32e3e78d1ba94f79fd733b43af22253;hpb=3123ca57f71d145bb5bcc4a2f754d3dff3225346;p=dygraphs.git diff --git a/auto_tests/tests/dygraph-options-tests.js b/auto_tests/tests/dygraph-options-tests.js index 4311fb5..ded9ee3 100644 --- a/auto_tests/tests/dygraph-options-tests.js +++ b/auto_tests/tests/dygraph-options-tests.js @@ -1,18 +1,21 @@ /** * @fileoverview Test cases for DygraphOptions. */ + +import Dygraph from '../../src/dygraph'; +import DygraphOptions from '../../src/dygraph-options'; +import OPTIONS_REFERENCE from '../../src/dygraph-options-reference'; + describe("dygraph-options-tests", function() { +cleanupAfterEach(); + var graph; beforeEach(function() { - document.body.innerHTML = "
"; graph = document.getElementById("graph"); }); -afterEach(function() { -}); - /* * Pathalogical test to ensure getSeriesNames works */ @@ -74,7 +77,7 @@ var getWarnings = function(div, data, opts) { }; it('testLogWarningForNonexistentOption', function() { - if (typeof(Dygraph.OPTIONS_REFERENCE) === 'undefined') { + if (!OPTIONS_REFERENCE) { return; // this test won't pass in non-debug mode. } @@ -103,7 +106,7 @@ it('testLogWarningForNonexistentOption', function() { }); it('testOnlyLogsEachWarningOnce', function() { - if (typeof(Dygraph.OPTIONS_REFERENCE) === 'undefined') { + if (!OPTIONS_REFERENCE) { return; // this test won't pass in non-debug mode. }