Added some tests

This commit is contained in:
Dom Parfitt
2018-10-15 14:05:33 +01:00
parent e4d1bfe44d
commit 32d11daec7

View File

@@ -0,0 +1,16 @@
import { select, BaseType } from 'd3-selection';
import * as d3Graphviz from 'd3-graphviz';
let graphviz: d3Graphviz.Graphviz<BaseType, any, BaseType, any>;
// Can get a graphviz render using extension method on d3-select
graphviz = select('test').graphviz();
// Can use graphviz method as selector
graphviz = d3Graphviz.graphviz('test');
// Can get the options
const options: d3Graphviz.GraphvizOptions = d3Graphviz.graphviz('').options();
// Can set the options
graphviz = graphviz.options(options);