Skip to content

Commit

Permalink
Merge d22c58d into 3e65a70
Browse files Browse the repository at this point in the history
  • Loading branch information
foray1010 committed Aug 14, 2020
2 parents 3e65a70 + d22c58d commit 69ecbcb
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions src/ExportMap.js
Expand Up @@ -650,6 +650,10 @@ export function recursivePatternCapture(pattern, callback) {

case 'ObjectPattern':
pattern.properties.forEach(p => {
if (p.type === 'ExperimentalRestProperty' || p.type === 'RestElement') {
callback(p.argument)
return
}
recursivePatternCapture(p.value, callback)
})
break
Expand Down
2 changes: 1 addition & 1 deletion tests/files/named-exports.js
Expand Up @@ -14,7 +14,7 @@ export class ExportedClass {
// destructuring exports

export var { destructuredProp } = {}
, { destructingAssign = null } = {}
, { destructingAssign = null, ...restAssign } = {}
, { destructingAssign: destructingRenamedAssign = null } = {}
, [ arrayKeyProp ] = []
, [ { deepProp } ] = []
Expand Down
2 changes: 1 addition & 1 deletion tests/src/core/getExports.js
Expand Up @@ -295,7 +295,7 @@ describe('ExportMap', function () {
context('#size', function () {

it('counts the names', () => expect(ExportMap.get('./named-exports', fakeContext))
.to.have.property('size', 10))
.to.have.property('size', 11))

it('includes exported namespace size', () => expect(ExportMap.get('./export-all', fakeContext))
.to.have.property('size', 1))
Expand Down
2 changes: 1 addition & 1 deletion tests/src/utils.js
Expand Up @@ -37,7 +37,7 @@ export function test(t) {
}, t, {
parserOptions: Object.assign({
sourceType: 'module',
ecmaVersion: 6,
ecmaVersion: 9,
}, t.parserOptions),
})
}
Expand Down

0 comments on commit 69ecbcb

Please sign in to comment.