I am trying to do some testing with ginkgo and gomega, I get down to the assertion error
Expected
<[]map[string]interface {} | len:1, cap:1>: []
To equal
<[]map[string]interface {} | len:1, cap:4>: []
I believe that the test is failing because they do not have equal "cap" values, Is there a way to make these cap values equal? Also, would having the items be in different orders cause these test to fail?
thank you
This shows that you have a slice of maps which had some data. This data is now removed. But slice capacity won't decrease. If you need to check if slice is empty, you can go to
BeEmpty
gomega matcher.If you want an empty slice with known capacity, you can do it like: