prettier/tests/range_css
Joseph Frazier 5f063ab168 Fix locEnd() for postcss parser (#2295)
* Fix locEnd() for postcss parser

`node.source` doesn't have an `end`, but `node.nodes[-1].source` does.

Fixes https://github.com/prettier/prettier/issues/2267

* Add regression test for https://github.com/prettier/prettier/issues/2267

See https://github.com/prettier/prettier/pull/2295#issuecomment-311484343

* Make locEnd() postcss fix more focused

This passes the tests again.

* Use getLast() instead of .slice()

See https://github.com/prettier/prettier/pull/2295#discussion_r124398553

* Move CSS range test into tests/range_css

This is so that the AST_COMPARE=1 tests don't try to parse CSS with Flow.
2017-06-27 15:12:22 -07:00
..
__snapshots__ Fix locEnd() for postcss parser (#2295) 2017-06-27 15:12:22 -07:00
issue2267.css Fix locEnd() for postcss parser (#2295) 2017-06-27 15:12:22 -07:00
jsfmt.spec.js Fix locEnd() for postcss parser (#2295) 2017-06-27 15:12:22 -07:00