Skip to content

Commit

Permalink
Merge pull request #147 from hshoff/harry-fix-tests
Browse files Browse the repository at this point in the history
[hierarchy] fix name collisions
  • Loading branch information
hshoff authored Sep 12, 2017
2 parents abc6378 + 2f20252 commit 517c288
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 23 deletions.
24 changes: 12 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
{
"devDependencies": {
"babel-jest": "^20.0.3",
"coveralls": "^2.13.1",
"jest": "^20.0.3",
"lerna": "2.1.2",
"react": "^15.5.4",
"react-addons-test-utils": "^15.5.1",
"react-dom": "^15.5.4",
"regenerator-runtime": "^0.10.5"
},
"name": "@vx/vx",
"name": "@vx/dev",
"version": "0.0.1",
"description": "Low-level visualization components",
"main": "index.js",
Expand Down Expand Up @@ -41,5 +31,15 @@
"charts"
],
"author": "@hshoff",
"license": "MIT"
"license": "MIT",
"devDependencies": {
"babel-jest": "^20.0.3",
"coveralls": "^2.13.1",
"jest": "^20.0.3",
"lerna": "2.1.2",
"react": "^15.5.4",
"react-addons-test-utils": "^15.5.1",
"react-dom": "^15.5.4",
"regenerator-runtime": "^0.10.5"
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react";

export default function DefaultLink({ link }) {
export default function HierarchyDefaultLink({ link }) {
return (
<line
x1={link.source.x}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from "react";

export default function DefaultNode({ node }) {
export default function HierarchyDefaultNode({ node }) {
return <circle cx={node.x} cy={node.y} r={15} fill="#21D4FD" />;
}
4 changes: 2 additions & 2 deletions packages/vx-hierarchy/src/hierarchies/Cluster.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import React from "react";
import cx from "classnames";
import { Group } from "@vx/group";
import { cluster as d3cluster } from "d3-hierarchy";
import DefaultLink from "../DefaultLink";
import DefaultNode from "../DefaultNode";
import DefaultLink from "../HierarchyDefaultLink";
import DefaultNode from "../HierarchyDefaultNode";

export default function Cluster({
top,
Expand Down
4 changes: 2 additions & 2 deletions packages/vx-hierarchy/src/hierarchies/Tree.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import React from "react";
import cx from "classnames";
import { Group } from "@vx/group";
import { tree as d3tree } from "d3-hierarchy";
import DefaultLink from "../DefaultLink";
import DefaultNode from "../DefaultNode";
import DefaultLink from "../HierarchyDefaultLink";
import DefaultNode from "../HierarchyDefaultNode";

export default function Tree({
top,
Expand Down
4 changes: 2 additions & 2 deletions packages/vx-hierarchy/src/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export { default as Tree } from "./hierarchies/Tree";
export { default as Cluster } from "./hierarchies/Cluster";
export { default as DefaultLink } from "./DefaultLink";
export { default as DefaultNode } from "./DefaultNode";
export { default as HierarchyDefaultLink } from "./HierarchyDefaultLink";
export { default as HierarchyDefaultNode } from "./HierarchyDefaultNode";
6 changes: 3 additions & 3 deletions packages/vx-hierarchy/test/Defaults.test.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { DefaultLink, DefaultNode } from "../src";
import { HierarchyDefaultLink, HierarchyDefaultNode } from "../src";

describe("<DefaultLink />", () => {
test("it should be defined", () => {
expect(DefaultLink).toBeDefined();
expect(HierarchyDefaultLink).toBeDefined();
});
});

describe("<DefaultNode />", () => {
test("it should be defined", () => {
expect(DefaultNode).toBeDefined();
expect(HierarchyDefaultNode).toBeDefined();
});
});

0 comments on commit 517c288

Please sign in to comment.