Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: case for destruction #17248

Merged
merged 1 commit into from
May 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 15 additions & 0 deletions test/cases/parsing/issue-17189/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import module from "./module.js";

it("should parse sparse arrays", function() {
var {
a,
...other1
} = module;
var {
b,
...other2
} = module;

expect(other1).toEqual({ b: 2, c: 3 });
expect(other2).toEqual({ a: 1, c: 3 });
});
6 changes: 6 additions & 0 deletions test/cases/parsing/issue-17189/module.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
var test = {
a: 1,
b: 2,
c: 3
};
export default test;