(actual: Plottable.IEntity<Plottable.Component>,
expected: Plottable.IEntity<Plottable.Component>,
msg: string)
| 115 | } |
| 116 | |
| 117 | export function assertEntitiesEqual(actual: Plottable.IEntity<Plottable.Component>, |
| 118 | expected: Plottable.IEntity<Plottable.Component>, |
| 119 | msg: string) { |
| 120 | assert.deepEqual(actual.datum, expected.datum, msg + " (datum)"); |
| 121 | assertPointsClose(actual.position, expected.position, 0.01, msg); |
| 122 | assert.strictEqual(actual.selection.size(), expected.selection.size(), msg + " (selection length)"); |
| 123 | actual.selection.nodes().forEach((element: Element, index: number) => { |
| 124 | assert.strictEqual(element, expected.selection.nodes()[index], msg + " (selection contents)"); |
| 125 | }); |
| 126 | assert.strictEqual(actual.component, expected.component, msg + " (component)"); |
| 127 | } |
| 128 | |
| 129 | export function assertPlotEntitiesEqual(actual: Plottable.Plots.IPlotEntity, |
| 130 | expected: Plottable.Plots.IPlotEntity, |
no test coverage detected