allow directional / undirectional
This commit is contained in:
10
test/Edge.ts
10
test/Edge.ts
@ -2,7 +2,15 @@ import test from 'ava';
|
||||
import { Edge, Color, EdgeStyles } from '../lib';
|
||||
|
||||
test ('serialize', (t) => {
|
||||
const e = new Edge ('foo', 'bar');
|
||||
const e = new Edge ('foo', 'bar', false);
|
||||
e.color = Color.white;
|
||||
e.style = EdgeStyles.dashed;
|
||||
const serialized = e.toString ();
|
||||
t.is (serialized, 'foo -- bar [style="dashed",color="#ffffff"]');
|
||||
});
|
||||
|
||||
test ('serialize directional', (t) => {
|
||||
const e = new Edge ('foo', 'bar', true);
|
||||
e.color = Color.white;
|
||||
e.style = EdgeStyles.dashed;
|
||||
const serialized = e.toString ();
|
||||
|
Reference in New Issue
Block a user