11 lines
304 B
TypeScript
11 lines
304 B
TypeScript
import test from 'ava';
|
|
import { Edge, Color, EdgeStyles } from '../lib';
|
|
|
|
test ('serialize', (t) => {
|
|
const e = new Edge ('foo', 'bar');
|
|
e.color = Color.white;
|
|
e.style = EdgeStyles.dashed;
|
|
const serialized = e.toString ();
|
|
t.is (serialized, 'foo -> bar [style="dashed",color="#ffffff"]');
|
|
});
|