title: How to test if component counts array length properly with Jest
body: <p>I have a component that I am giving an array with objects as props to it like this:</p>
  
  <pre><code>describe('component', () =&gt; {
    it('should return the correct number of items passed in the array', () =&gt; {
      const comp = shallowMount(component, {propsData: {
        buttons: [
          {name:'button1'},
          {name:'button2'}
        ]
      }});
      expect(component.length).toHaveLength(buttons).length
    });
  });
  </code></pre>
  
  <p>How can I test that the provided array has the correct length, for example if there are two objects in the array, the component should return two, if there is one, one, if there are none then it should return 0, how can I achieve that? I tried</p>
  
  <pre><code>expect(component.length).toHaveLength(buttons).length
  </code></pre>
  
  <p>But that does not work</p>