Commit Graph

21 Commits (master)

Author SHA1 Message Date
Georgii Dolzhykov ab598e6e23
tests: rename duplicate bindings to be ready for #6400 (#6662) 2019-10-15 18:27:39 +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
Eric Sakmar 93e8b15311 verify the precedingNode type when handling import declaration comments (#5016) 2018-08-27 20:02:40 -06: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 Azzola 9e7b02d50e Print {} in import if it's in the source, fixes #2145 (#2150) 2017-06-15 20:19:01 +10:00
Lucas Azzola 4395e09b78 fix(import): allow break with both default named import, fixes #2050 (#2096) 2017-06-10 21:55:21 -07:00
Christopher Chedeau 267c6edaf5 Inline import type (#1729)
A long time ago I introduced the ability to break for import statements. Then, later on, we removed the ability for require to break and go over the 80 column mark. In order to be consistent, we should do the same for import statements as well.
2017-05-25 16:27:04 -07:00
Christopher Chedeau 069df25475 Fix last comment of import (#1677)
We used to use isBlock as a heuristic but the real thing we want is to know if the comment is on its own line. Now it works with both :)
2017-05-23 12:33:46 -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
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
Davy Duperron 748dcbf70d Fix import declaration comments (#1030)
* Add handleImportDeclarationComments function.

* Fix indent.

* Update test cases accordingly.

* Implement better heuristic for adding comments.

* Make the test case more exhaustive.
2017-03-17 08:11:43 -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
Christopher Chedeau 516f5900d8 Stabilize import as comments (#855)
Since this is extremely rare, I just took the easy way out and if you are adding a comment inside the "as" node, I just move it outside. We could be more fancy but that works.

Fixes #620
2017-03-02 22:22:33 -05: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 0924e7f3dc Break long imports (#590)
Fixes #576
2017-02-03 16:19:14 -05:00
Christopher Chedeau 1a9e5e9022 Support multiple standalones in import (#389)
There was an assertion that there would be only one, it turned out not to be the case.

Fixes #386
2017-01-22 12:34:00 -08:00
Michał Pierzchała 5199144878 Fix bracketSpacing typo in tests (#299) 2017-01-18 12:22:12 -08:00
Christopher Chedeau 92795a0fda Fix space missing before `,` on import with bracket spacing off (#279)
Same fix as #278. We use the same (wrong) pattern in both places
2017-01-17 17:12:56 -05:00