Add test for custom typeFromRoot

Don't merge this yet