Commit Graph

14 Commits (master)

Author SHA1 Message Date
Evilebot Tnawi dcaed91518 fix: respect newlines in parameters (#5836) 2019-04-04 09:50:07 -03: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
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
Lucas Duailibe 878412c680 Break parens for binaries in member expression (#2958)
* Break parens for binaries in member expression

* Add test case

* Update snapshot
2017-10-22 17:29:13 -06:00
Jacky Ho 5b7b012fcd Account for empty lines in long member call chain (#3035)
* Account for empty lines in member chain

* Add tests

* Account for parens

* Improve tests

* Add some comments

* Remove an outdated comment

* Fix lint errors

* Refactor a line of code

* Add one more comment for clarification
2017-10-19 09:25:51 +11:00
jackyho112 88049a3d6b Keep original empty lines in argument list (#2763)
* Account for empty lines in argument list in typical cases

* Fix build errors

* Fix one more build error

* Refactor

* Have better variable names for printing argument list

* Account for feedback on argument list empty lines

* Improve expanion argument logics

* Add a lot more tests

* Improve a test

* Make code cleaner

* Fix a lint error

* Refactor

* Add one last check

* Refactor
2017-09-26 17:47:56 +02: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
ChristianHersevoort 04c959d687 Feature/verify against same snapshot (#1087)
* Verify parsers against same snapshot

- Reworked run_spec, now accepts 3th optional array argument for
additional parsers to verify against
- Merged duplicate run_spec configs
- Removed duplicate snapshot data

* Formatted run_spec.js with prettier

* Fixed node4 incompatibility
2017-03-25 08:10:17 -07:00
Christopher Chedeau c3199359b0 Revert "Improve snapshot naming" (#1070)
* Revert "Remove mutation in `printBinaryishExpressions` (#1067)"

This reverts commit e7312ad7b2.

* Revert "Make it clear what parser was used in each snapshot (#1068)"

This reverts commit 4f7ae4815b.
2017-03-21 17:38:28 -07:00
ChristianHersevoort 4f7ae4815b Make it clear what parser was used in each snapshot (#1068) 2017-03-21 14:47:23 -07:00
James Henry 72456bf06f [WIP] TypeScript Parser (#915)
* WIP immediate feedback

* typescript parser is drop-in replacement for flow parser

* Add new TypeScript Parser snapshots where drop-in replacement possible

* Snapshot updates after rebasing

* Remove unnecessary stripping of properties on TypeScript parser AST

* Remove annotated issues

* Move TS dependencies to dev for now
2017-03-08 13:18:13 -08:00
Rogelio Guzman d45e157563 Upgrade to Jest 19 (#762)
* Upgrade to Jest 19

* Use exact versions for Jest
2017-02-21 13:59:19 -08:00
Christopher Chedeau 8bc3c617a0 Preserve next line with trailing comment (#535)
It turns that our hasNextLine logic needs to be tuned to skip all the trailing comments. The code is not pretty but it does the job. It looks like it fixes a bunch of things in the test cases :)

I made sure that nested inline comments are NOT valid JavaScript

```js
/* /* a */ */
Uncaught SyntaxError: Unexpected token *
```

so it is okay to do a dumb search for */ when you are in a comment
2017-01-31 11:27:44 -05:00