File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,10 +6,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66
77## [ Unreleased]
88
9+ ### Fixed
10+ * Failed to resolve entry for package "d3-graphviz" #263
11+
912## [ 5.0.1] – 2022-12-27
1013
1114### Fixed
12- * Failed to resolve entry for package "d3-graphviz" #263
15+ * Failed to resolve entry for package "d3-graphviz" (partial fix) #263
1316
1417## [ 5.0.0] – 2022-12-26
1518
Original file line number Diff line number Diff line change 1414 ],
1515 "license" : " BSD-3-Clause" ,
1616 "type" : " module" ,
17- "exports" : " ./src/ index.js" ,
17+ "exports" : " ./index.js" ,
1818 "jsnext:main" : " index" ,
1919 "homepage" : " https://github.com/magjac/d3-graphviz" ,
2020 "repository" : {
Original file line number Diff line number Diff line change 1+ import tape from "./tape.js" ;
2+ import jsdom from "./jsdom.js" ;
3+ import * as d3 from "d3-selection" ;
4+ import * as d3_graphviz from "d3-graphviz" ;
5+
6+ tape ( "Simple rendering an SVG from graphviz DOT using default export" , function ( test ) {
7+ var window = global . window = jsdom ( '<div id="graph"></div>' ) ;
8+ var document = global . document = window . document ;
9+ var graphviz = d3_graphviz . graphviz ( "#graph" )
10+ . renderDot ( 'digraph {a -> b;}' , checkGraph ) ;
11+
12+ function checkGraph ( ) {
13+ test . equal ( d3 . selectAll ( '.node' ) . size ( ) , 2 , 'Number of nodes' ) ;
14+ test . equal ( d3 . selectAll ( '.edge' ) . size ( ) , 1 , 'Number of edges' ) ;
15+ test . equal ( d3 . selectAll ( 'ellipse' ) . size ( ) , 2 , 'Number of ellipses' ) ;
16+ test . equal ( d3 . selectAll ( 'polygon' ) . size ( ) , 2 , 'Number of polygons' ) ;
17+ test . equal ( d3 . selectAll ( 'path' ) . size ( ) , 1 , 'Number of paths' ) ;
18+
19+ test . end ( ) ;
20+ }
21+ } ) ;
You can’t perform that action at this time.
0 commit comments