Skip to content

Commit

Permalink
Chore: test Property > .key with { a = 1 } pattern (fixes #14799) (#1…
Browse files Browse the repository at this point in the history
  • Loading branch information
mdjermanovic committed Sep 16, 2021
1 parent a744dfa commit 47be800
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/lib/linter/node-event-generator.js
Expand Up @@ -314,6 +314,15 @@ describe("NodeEventGenerator", () => {
["[name.length=3]:exit", ast.body[1].expression]
]
);

// https://github.com/eslint/eslint/issues/14799
assertEmissions(
"const {a = 1} = b;",
["Property > .key"],
ast => [
["Property > .key", ast.body[0].declarations[0].id.properties[0].key]
]
);
});

describe("traversing the entire non-standard AST", () => {
Expand Down

0 comments on commit 47be800

Please sign in to comment.