Created
January 26, 2018 10:19
-
-
Save alexbeletsky/402501d4944d81b3d910d3eadd59d525 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const makeTestTitle = test => { | |
let next = test; | |
const title = []; | |
for (;;) { | |
if (!next.parent) { | |
break; | |
} | |
title.push(next.title); | |
next = next.parent; | |
} | |
return title.reverse().join(' '); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment