This repository has been archived by the owner on Aug 18, 2021. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 208
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Moved backtick to fix test 'getter/setter babel#218' as indent matters Fixed line numbers for some tests
Avoids error that shows when using template strings for tests: line 253 line comments line 260 block comments line 306 jsdoc Error: At loc.start.column: are different (6 !== 0)
Awesome |
We can use something we do in babili - unpad function |
Ok will do this, thanks |
stevenjob
force-pushed
the
template-strings
branch
from
October 11, 2016 16:52
4cd9348
to
32c742e
Compare
stevenjob
force-pushed
the
template-strings
branch
from
October 11, 2016 16:57
32c742e
to
d03de31
Compare
Unpad could probably be its own module but i have just copied it to a utils folder for now. I have used unpad in each test separately as it was simple to add with regex and i did not want to modify parseAndAssertSame or verifyAndAssertMessages. I assumed there could be use cases where you would want leading spaces in some test code. |
Closed
Yeah looks like there is a module for it that was from babili/babel originally https://www.npmjs.com/package/unpad but this is fine Thanks! 🎉 |
nicolo-ribaudo
pushed a commit
to babel/babel
that referenced
this pull request
Nov 14, 2019
* Use template strings in non-regression tests * Refactor non-regression tests to fix test failures Moved backtick to fix test 'getter/setter babel/babel-eslint#218' as indent matters Fixed line numbers for some tests * Use template strings in babel-eslint tests * Fix tests for babel-eslint Avoids error that shows when using template strings for tests: line 253 line comments line 260 block comments line 306 jsdoc Error: At loc.start.column: are different (6 !== 0) * Other small template literal changes * Add unpad to correctly indent template literals
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The problem with this PR is that using multiline template literals causes indentation to show in the new multiline string where it did not previously with the array join. (an extra 6 spaces is now before most lines)
I have used template literals in all places and the tests all still pass.