From b8833443dec9d649214c417804efda2bef2c21fa Mon Sep 17 00:00:00 2001 From: Brian Vaughn Date: Sun, 18 Sep 2016 07:20:27 -0700 Subject: [PATCH] Resolved failing Async-Promise test --- test/Async-test.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/Async-test.js b/test/Async-test.js index e54cd59ca5..58a6fa4678 100644 --- a/test/Async-test.js +++ b/test/Async-test.js @@ -235,7 +235,7 @@ describe('Async', () => { // Error: Promise rejected with no or falsy reason // It seems to be more or less then same as this test (which passes): // https://github.com/JedWatson/react-select/blob/916ab0e62fc7394be8e24f22251c399a68de8b1c/test/Async-test.js#L158-L181 - it.skip('should handle an error by setting options to an empty array', () => { + it('should handle an error by setting options to an empty array', () => { let promise, rejectPromise; function loadOptions (input, resolve) { promise = expect.promise((resolve, reject) => { @@ -251,9 +251,9 @@ describe('Async', () => { }); expect(asyncNode.querySelectorAll('[role=option]').length, 'to equal', 1); typeSearchText('bar'); - rejectPromise(); + rejectPromise(new Error('error')); return expect.promise.all([promise]) - .then(() => expect(asyncNode.querySelectorAll('[role=option]').length, 'to equal', 0)); + .catch(() => expect(asyncNode.querySelectorAll('[role=option]').length, 'to equal', 0)); }); }); });