Skip to content

Commit 044675f

Browse files
committed
Update test
1 parent 6681821 commit 044675f

File tree

1 file changed

+32
-1
lines changed

1 file changed

+32
-1
lines changed

packages/viz/test/graph-objects.test.js

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,36 @@ describe("Viz", function() {
252252
const result = viz.render({
253253
subgraphs: [
254254
{
255+
nodes: [
256+
{ name: "a" }
257+
]
258+
}
259+
]
260+
});
261+
262+
assert.deepStrictEqual(result, {
263+
status: "success",
264+
output: `digraph {
265+
graph [bb="0,0,54,36"];
266+
node [label="\\N"];
267+
{
268+
a [height=0.5,
269+
pos="27,18",
270+
width=0.75];
271+
}
272+
}
273+
`,
274+
errors: []
275+
});
276+
});
277+
278+
it("applies subgraph attributes correctly", function() {
279+
const result = viz.render({
280+
subgraphs: [
281+
{
282+
graphAttributes: {
283+
color: "green"
284+
},
255285
nodeAttributes: {
256286
color: "red"
257287
},
@@ -266,8 +296,9 @@ describe("Viz", function() {
266296
status: "success",
267297
output: `digraph {
268298
graph [bb="0,0,54,36"];
269-
node [label="\N"];
299+
node [label="\\N"];
270300
{
301+
graph [color=green];
271302
node [color=red];
272303
a [height=0.5,
273304
pos="27,18",

0 commit comments

Comments
 (0)