Commit Graph

4 Commits (master)

Author SHA1 Message Date
Ika 4af3dd4b07
test: improve snapshots (#5521)
- before
  ```
  ${input}${"~".repeat(printWidth)}
  ${output}
  ```
- after
  ```
  ===options===
  ${options}
  ${" ".repeat(printWidth)}| printWidth
  ====input====
  ${input}
  ===output====
  ${output}
  =============
  ```
2018-11-25 16:21:14 +08:00
Simen Bekkhus 51b7c02e12 Upgrade jest to 22 (#4782)
* chore: upgrade Jest

* chore: update snapshots

* chore: lock down babel dependency using invalid syntax

* 2 args to test.skip

* use jest 22 for now

* Revert "2 args to test.skip"

This reverts commit 691fdc3f99e320f2303958f2b503f7b4c93fa455.

* remove snapshot name from matcher

* fix standalone tests skips
2018-07-03 03:06:29 -03:00
Lucas Duailibe f119d4a90f
Change run_spec to have explicit parser list (#3356) 2017-11-30 03:31:52 -03:00
Joseph Frazier b47c0b4e04 Allow formatting ranges of JSON (#2298)
* Add test for https://github.com/prettier/prettier/issues/2297

* Add JSON types to isSourceElement()

See https://github.com/prettier/prettier/issues/2297

* Avoid expanding format range when possible

This fixes https://github.com/prettier/prettier/issues/2297

* Move JSON range test into tests/range_json

This is so that the AST_COMPARE=1 tests don't try to parse JSON with Flow.

* Check parser in isSourceElement()

Otherwise JSON formatting would format weird things inside of JS.
See https://github.com/prettier/prettier/pull/2298#discussion_r124407056

* Use arrow functions instead of .bind()

See https://github.com/prettier/prettier/pull/2298#discussion_r124409783

* Add test of range-formatting JSON identifier

See https://github.com/prettier/prettier/pull/2298/files#r124410750

* Allow range-formatting JSON identifier

See https://github.com/prettier/prettier/pull/2298/files#r124410750

* Fix lint
2017-06-27 16:04:42 -07:00