X-Git-Url: http://git.squeep.com/?p=websub-hub;a=blobdiff_plain;f=test%2Fsrc%2Ftemplate%2Fhistogram-svg.js;fp=test%2Fsrc%2Ftemplate%2Fhistogram-svg.js;h=656ccdb419bdde41f7ab5d06161fa64e8b92bf80;hp=0000000000000000000000000000000000000000;hb=737fbd003d5c4dfea81b667ef906f1c106a60612;hpb=17b4ff9c1974842c02071d2cd02144d2e5a99eb5 diff --git a/test/src/template/histogram-svg.js b/test/src/template/histogram-svg.js new file mode 100644 index 0000000..656ccdb --- /dev/null +++ b/test/src/template/histogram-svg.js @@ -0,0 +1,29 @@ +/* eslint-env mocha */ +'use strict'; + +const assert = require('assert'); +const template = require('../../../src/template/histogram-svg'); + +describe('Histogram SVG Template', function () { + let items, options; + beforeEach(function () { + items = []; + options = {}; + }); + it('covers defaults', function () { + const result = template(items, options); + assert(result); + }); + it('covers options', function () { + items = [0, 1, 2]; + options = { + labelX: 'Days Ago', + labelZero: 'Today', + tickEvery: 2, + frameColor: undefined, + labelHeight: 0, + }; + const result = template(items, options); + assert(result); + }); +}); \ No newline at end of file