Add test for custom typeFromRoot