Commit Graph

13 Commits (master)

Author SHA1 Message Date
Wei-Wei Wu 91c20f7fbe Rename "babylon" with "babel" (#5647) 2018-12-27 21:05:19 +08:00
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
Lucas Duailibe b5fd382fe8
Inline the arguments of an arrow function in the body is conditional expression (#5209) 2018-10-08 19:28:58 -03: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
Suchipi Izumi 6abdd2c6b7 PR feedback 2017-11-27 22:27:34 -07:00
Stephen Scott e4eb8a4065 Add implementation for arrow parens option
Based on https://github.com/prettier/prettier/pull/2676

* Thread `path` and `options` through helpers so we don't need to add `needsParens` onto the AST node anymore (mutation)
* Pull test call detection logic out into helper method so it can be re-used for arrow function parens
* Add arrow function parens option implementation (avoid/always)
* Don't break arrow function parens around (done) in test call
2017-11-27 22:27:34 -07:00
Stephen Scott 9a1e408a3f Add option and specs (no implementation yet)
These new snapshots are from https://github.com/prettier/prettier/pull/2676
2017-11-27 22:26:58 -07:00
Lucas Azzola 2a58e6bc06 test(typescript): enable typescript-verify on most tests (#1781) 2017-05-27 17:57:07 -07:00
Simon Lydell bc5186e544 Run Prettier on all source files (#1648)
This commit updates `npm run format:all` to not only format .js files in
src/ and bin/, but also tests_config/ and scripts/, as well as all
jsfmt.spec.js files.

It also includes the result of running `npm run format:all`, except
changes to src/ and bin/.
2017-05-21 08:13:11 -07:00
Alessandro Di Felice bfe3161762 Break class expression returned by arrow call (#1464) 2017-04-30 17:49:31 -07:00
Jan Kassens b82220b20f Prittier printing of snapshots (#1190)
This uses a custom snapshot serializer to reduce escaping in snapshot files and
make them easier to read.

Snapshot serializers are documented here:
https://facebook.github.io/jest/docs/configuration.html#snapshotserializers-array-string
2017-04-12 13:41:51 -07:00
Christopher Chedeau e0eb438e7b Add newline for bracket-less arrow functions that return calls (#927)
I've tried a lot of places where to fix this and this is the only one that gives correct results. This is likely not exhaustive but works for that use case. It's been reported twice in issues and I've seen it happen a few other times so we probably want to get it fixed.

Fixes #922
Fixes #797
2017-04-11 08:50:49 -07:00