Skip to content

Commit 9325439

Browse files
committed
Fix flowTypeDocBlockHandler-test, it was never executed
1 parent b15e1d4 commit 9325439

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/handlers/__tests__/flowTypeDocBlockHandler-test.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,10 @@ describe('flowTypeDocBlockHandler', () => {
155155
description: 'bar description',
156156
},
157157
});
158+
});
158159

159-
it('does not support union proptypes', () => {
160-
var definition = statement(`
160+
it('does not support union proptypes', () => {
161+
var definition = statement(`
161162
(props: Props) => <div />;
162163
163164
var React = require('React');
@@ -167,11 +168,11 @@ describe('flowTypeDocBlockHandler', () => {
167168
type Props = Imported | Other | { foo: 'fooValue' };
168169
`).get('expression');
169170

170-
expect(() => flowTypeDocBlockHandler(documentation, definition))
171-
.toThrowError(TypeError, "react-docgen doesn't support Props of union types");
172-
});
173-
});
171+
expect(() => flowTypeDocBlockHandler(documentation, definition))
172+
.not.toThrow();
174173

174+
expect(documentation.descriptors).toEqual({});
175+
});
175176

176177
describe('does not error for unreachable type', () => {
177178
function test(code) {

0 commit comments

Comments
 (0)