@samitouri / QOS-React-2 / commits / e0904a0a90

Print number of matches (previously unclear if zero or multiple)

Jim committed Oct 16, 2015 at 12:43 UTC e0904a0a90a4dee14c4ff472f15f34e0c8746446
1 file changed +3 -1
src/test/ReactTestUtils.js
+3 -1
@@ -237,7 +237,9 @@ var ReactTestUtils = {
237 findRenderedDOMComponentWithTag: function(root, tagName) {
238 var all = ReactTestUtils.scryRenderedDOMComponentsWithTag(root, tagName);
239 if (all.length !== 1) {
240 - throw new Error('Did not find exactly one match for tag:' + tagName);
240 + throw new Error('Did not find exactly one match ' +
241 + '(found ' + all.length + ') for tag:' + tagName
242 + );
243 }
244 return all[0];
245 },