it('should work with a custom template regexp', () => {
    const tree = [{
      foo: {
        bar: 'test',
      },