jsfmt.spec.js.snap 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374
  1. // Jest Snapshot v1, https://goo.gl/fbAQLP
  2. exports[`class-declaration.js 1`] = `
  3. class a {
  4. b( ) {}
  5. }
  6. let x~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  7. class a {
  8. b() {}
  9. }
  10. let x
  11. `;
  12. exports[`different-levels.js 1`] = `
  13. call(1,2,3)
  14. call(1,2,3)
  15. function f() {
  16. call(1,2,3)
  17. }
  18. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  19. call(1,2,3)
  20. call(1, 2, 3);
  21. function f() {
  22. call(1, 2, 3);
  23. }
  24. `;
  25. exports[`function-declaration.js 1`] = `
  26. function ugly ( {a=1, b = 2 } ) {}
  27. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  28. function ugly({ a = 1, b = 2 }) {}
  29. `;
  30. exports[`ignore-indentation.js 1`] = `
  31. function ugly ( {a=1, b = 2 } ) {
  32. function ugly ( {a=1, b = 2 } ) {
  33. function ugly ( {a=1, b = 2 } ) {
  34. \`multiline template string
  35. with too much indentation\`
  36. }
  37. }
  38. }
  39. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  40. function ugly ( {a=1, b = 2 } ) {
  41. function ugly ( {a=1, b = 2 } ) {
  42. function ugly ( {a=1, b = 2 } ) {
  43. \`multiline template string
  44. with too much indentation\`;
  45. }
  46. }
  47. }
  48. `;
  49. exports[`module-export1.js 1`] = `
  50. import def , {named} from 'x'
  51. export * from 'd'
  52. export const x
  53. = 42
  54. export default 42
  55. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  56. import def , {named} from 'x'
  57. export * from "d";
  58. export const x
  59. = 42
  60. export default 42
  61. `;
  62. exports[`module-export2.js 1`] = `
  63. import def , {named} from 'x'
  64. export * from 'd'
  65. export const x
  66. = 42
  67. export default 42
  68. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  69. import def , {named} from 'x'
  70. export * from 'd'
  71. export const x = 42;
  72. export default 42
  73. `;
  74. exports[`module-export3.js 1`] = `
  75. import def , {named} from 'x'
  76. export * from 'd'
  77. export const x
  78. = 42
  79. export default 42
  80. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  81. import def , {named} from 'x'
  82. export * from 'd'
  83. export const x
  84. = 42
  85. export default 42;
  86. `;
  87. exports[`module-import.js 1`] = `
  88. import def , {named} from 'x'
  89. export * from 'd'
  90. export const x
  91. = 42
  92. export default 42
  93. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  94. import def, { named } from "x";
  95. export * from 'd'
  96. export const x
  97. = 42
  98. export default 42
  99. `;
  100. exports[`multiple-statements.js 1`] = `
  101. call(
  102. 1, 2,3
  103. );
  104. call(
  105. 1, 2,3
  106. );
  107. call(
  108. 1, 2,3
  109. );
  110. call(
  111. 1, 2,3
  112. );
  113. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  114. call(
  115. 1, 2,3
  116. );
  117. call(1, 2, 3);
  118. call(1, 2, 3);
  119. call(
  120. 1, 2,3
  121. );
  122. `;
  123. exports[`multiple-statements2.js 1`] = `
  124. call(
  125. 1, 2,3
  126. );
  127. call(
  128. 1, 2,3
  129. );
  130. call(
  131. 1, 2,3
  132. );
  133. call(
  134. 1, 2,3
  135. );
  136. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  137. call(
  138. 1, 2,3
  139. );
  140. call(1, 2, 3);
  141. call(1, 2, 3);
  142. call(
  143. 1, 2,3
  144. );
  145. `;
  146. exports[`nested.js 1`] = `
  147. try {
  148. if (condition) {
  149. body
  150. }
  151. }
  152. catch (err) {}
  153. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  154. try {
  155. if (condition) {
  156. body;
  157. }
  158. } catch (err) {}
  159. `;
  160. exports[`nested2.js 1`] = `
  161. try {
  162. if (condition) {
  163. body
  164. }
  165. }
  166. catch (err) {}
  167. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  168. try {
  169. if (condition) {
  170. body;
  171. }
  172. }
  173. catch (err) {}
  174. `;
  175. exports[`nested3.js 1`] = `
  176. try {
  177. 1;if (condition) {
  178. body
  179. }
  180. }
  181. catch (err) {}
  182. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  183. try {
  184. 1;if (condition) {
  185. body;
  186. }
  187. }
  188. catch (err) {}
  189. `;
  190. exports[`object-expression.js 1`] = `
  191. const y = {a:1, b:2}
  192. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  193. const y = { a: 1, b: 2 };
  194. `;
  195. exports[`object-expression2.js 1`] = `
  196. const y = [
  197. {
  198. a: 1,
  199. },
  200. {
  201. a: 1,
  202. b:2
  203. },
  204. ]
  205. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  206. const y = [
  207. {
  208. a: 1
  209. },
  210. {
  211. a: 1,
  212. b: 2
  213. }
  214. ];
  215. `;
  216. exports[`range.js 1`] = `
  217. function ugly ( {a=1, b = 2 } ) {
  218. function ugly ( {a=1, b = 2 } ) {
  219. function ugly ( {a=1, b = 2 } ) {
  220. \`multiline template string
  221. with too much indentation\`
  222. }
  223. }
  224. }
  225. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  226. function ugly ( {a=1, b = 2 } ) {
  227. function ugly ( {a=1, b = 2 } ) {
  228. function ugly ( {a=1, b = 2 } ) {
  229. \`multiline template string
  230. with too much indentation\`;
  231. }
  232. }
  233. }
  234. `;
  235. exports[`range-end.js 1`] = `
  236. // Unchanged
  237. call(
  238. 1, 2,3
  239. );
  240. call(
  241. 1, 2,3
  242. );~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  243. // Unchanged
  244. call(
  245. 1, 2,3
  246. );
  247. call(1, 2, 3);
  248. `;
  249. exports[`range-start.js 1`] = `
  250. call(
  251. 1, 2,3
  252. );
  253. // Unchanged
  254. call(
  255. 1, 2,3
  256. );
  257. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  258. call(1, 2, 3);
  259. // Unchanged
  260. call(
  261. 1, 2,3
  262. );
  263. `;
  264. exports[`try-catch.js 1`] = `
  265. try {}
  266. catch (err) {}
  267. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  268. try {
  269. } catch (err) {}
  270. `;
  271. exports[`whitespace.js 1`] = `
  272. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  273. `;