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

Add more tests for DCE'ing conditional expressions #218

Merged
merged 1 commit into from
Oct 23, 2016
Merged

Add more tests for DCE'ing conditional expressions #218

merged 1 commit into from
Oct 23, 2016

Conversation

erikdesjardins
Copy link
Contributor

@erikdesjardins erikdesjardins commented Oct 23, 2016

...which involve a couple more complex conditions than true or false

});

it("should evaluate conditional expressions 5", () => {
const source = "'foo' === 'foo' ? a() : b();";
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't sure if the assumption was that 'foo' === 'foo' would be reduced to true by constant folding, but I didn't see any tests for that in the constant folding plugin.

So if you prefer I can move these two to constant-folding-test.js

@kangax kangax merged commit ace753d into babel:master Oct 23, 2016
@kangax
Copy link
Member

kangax commented Oct 23, 2016

Thanks!

@erikdesjardins erikdesjardins deleted the cond-expr-test branch October 23, 2016 19:08
@boopathi boopathi added this to the 0.0.8 milestone Oct 30, 2016
@hzoo hzoo added the Tag: Internal Pull Request changing project internals - code that is NOT published label Oct 31, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Tag: Internal Pull Request changing project internals - code that is NOT published
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants