Skip to content

Commit dae271c

Browse files
author
Ives van Hoorne
committed
Add test
1 parent aca4bde commit dae271c

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
@@ -172,6 +172,18 @@ describe('defaultPropsHandler', () => {
172172
Foo.defaultProps = { abc: {xyz: abc.def, 123: 42} };
173173
`;
174174
test(parse(src).get('body', 0, 'declarations', 0, 'init'));
175-
})
175+
});
176+
177+
it('should work with aliases', () => {
178+
var src = `
179+
({
180+
foo = "bar",
181+
bar = 42,
182+
baz = ["foo", "bar"],
183+
abc: defg = {xyz: abc.def, 123: 42}
184+
}) => <div />
185+
`;
186+
test(parse(src).get('body', 0, 'expression'));
187+
});
176188
});
177189
});

0 commit comments

Comments
 (0)