Skip to content

Commit

Permalink
✅ Add gradient defs test to Alluvial suite
Browse files Browse the repository at this point in the history
  • Loading branch information
joao-m-santos authored and joao committed Jul 5, 2023
1 parent b5216da commit 65d9dd9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export const options: AlluvialDiagramOptions = {
withLegend: false,

// Alluvial options
gradient: false,
highlightedElements: 'full',
nodePadding: 16,
nodeWidth: 16,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,17 @@ describe('lume-alluvial-diagram.vue', () => {
expect(el.exists()).toBeTruthy();
});

test('mounts with gradient definitions', async () => {
const wrapper = mount(LumeAlluvialDiagram, {
props: {
data: DATASETS.Basic.data,
options: { gradient: true },
},
});

expect(wrapper.find('defs').exists()).toBe(true);
});

// should be tested in the scope of alluvial-graph
test.skip('should throw error in case of a dataset with circular links', async () => {
const values = [
Expand Down

0 comments on commit 65d9dd9

Please sign in to comment.