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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip modifying argument if SpreadElement appears immediately beneath assert #29

Merged
merged 1 commit into from
Jan 8, 2019

Conversation

twada
Copy link
Member

@twada twada commented Jan 8, 2019

Skip modifying argument if SpreadElement appears immediately beneath assert.

repro case:

const args = [true === false, 'message'];
assert(...args);

assert(...args) looks like one argument syntactically, however there are two arguments actually.

babel-plugin-espower works at the syntax level so it cannot handle SpreadElement that appears immediately beneath assert.

fixes #28
refs avajs/ava#2004

@twada twada merged commit 5c1a089 into master Jan 8, 2019
@twada twada deleted the spread-element-immediately-beneath-assert branch January 8, 2019 04:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Detecting the spread operator
1 participant