Skip to content

Commit 5b14b55

Browse files
author
Ives van Hoorne
committed
Add test
1 parent 537fa24 commit 5b14b55

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

src/handlers/__tests__/defaultPropsHandler-test.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,18 @@ describe('defaultPropsHandler', () => {
151151
Foo.defaultProps = { abc: {xyz: abc.def, 123: 42} };
152152
`;
153153
test(parse(src).get('body', 0, 'declarations', 0, 'init'));
154-
})
154+
});
155+
156+
it('should work with aliases', () => {
157+
var src = `
158+
({
159+
foo = "bar",
160+
bar = 42,
161+
baz = ["foo", "bar"],
162+
abc: defg = {xyz: abc.def, 123: 42}
163+
}) => <div />
164+
`;
165+
test(parse(src).get('body', 0, 'expression'));
166+
});
155167
});
156168
});

0 commit comments

Comments
 (0)