Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Remi PLANEL
bioviz-js
Commits
57d104f7
Commit
57d104f7
authored
Jun 11, 2019
by
Remi PLANEL
Browse files
Test nodeSize
parent
ed0b9112
Pipeline
#12412
passed with stage
in 56 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
tests/phylogram-layout.test.ts
View file @
57d104f7
...
...
@@ -46,7 +46,7 @@ describe("Test layout", () => {
return
(
curr
.
data
.
name
===
"
child10
"
)
?
curr
:
acc
;
},
pointData
)
test
(
"
Root node middle height
"
,
()
=>
{
expect
(
pointData
.
x
).
toBe
(
40
5
);
expect
(
pointData
.
x
).
toBe
(
37
5
);
})
// Test X
...
...
@@ -68,4 +68,16 @@ describe("Test layout", () => {
expect
(
nodes
.
r
).
toBe
(
2
);
}
})
// Change how define size
test
(
"
nodeSize
"
,
()
=>
{
const
xStep
=
50
;
const
newData
=
phylogramLayout
.
nodeSize
([
xStep
,
100
])(
data
);
let
yExpected
=
0
;
newData
.
leaves
().
forEach
(
leaf
=>
{
expect
(
leaf
.
x
).
toBe
(
yExpected
);
yExpected
+=
xStep
;
});
});
})
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment