fix(tree): rewrite test for emitting