jsfmt.spec.js.snap 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. // Jest Snapshot v1, https://goo.gl/fbAQLP
  2. exports[`bind_parens.js 1`] = `
  3. (a || b)::c;
  4. a || (b::c);
  5. ::obj.prop;
  6. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  7. (a || b)::c;
  8. a || b::c;
  9. ::obj.prop;
  10. `;
  11. exports[`bind_parens.js 2`] = `
  12. (a || b)::c;
  13. a || (b::c);
  14. ::obj.prop;
  15. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  16. ;(a || b)::c
  17. a || b::c
  18. ;::obj.prop
  19. `;
  20. exports[`long_name_method.js 1`] = `
  21. class X {
  22. constructor() {
  23. this.testLongNameMethodAndSomethingElseLallala = ::this.testLongNameMethodAndSomethingElseLallala;
  24. }
  25. testLongNameMethodAndSomethingElseLallala() {
  26. return true;
  27. }
  28. }~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  29. class X {
  30. constructor() {
  31. this.testLongNameMethodAndSomethingElseLallala =
  32. ::this.testLongNameMethodAndSomethingElseLallala;
  33. }
  34. testLongNameMethodAndSomethingElseLallala() {
  35. return true;
  36. }
  37. }
  38. `;
  39. exports[`long_name_method.js 2`] = `
  40. class X {
  41. constructor() {
  42. this.testLongNameMethodAndSomethingElseLallala = ::this.testLongNameMethodAndSomethingElseLallala;
  43. }
  44. testLongNameMethodAndSomethingElseLallala() {
  45. return true;
  46. }
  47. }~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  48. class X {
  49. constructor() {
  50. this.testLongNameMethodAndSomethingElseLallala =
  51. ::this.testLongNameMethodAndSomethingElseLallala
  52. }
  53. testLongNameMethodAndSomethingElseLallala() {
  54. return true
  55. }
  56. }
  57. `;
  58. exports[`method_chain.js 1`] = `
  59. import {interval} from 'rxjs/observable/interval';
  60. import {filter} from 'rxjs/operator/filter';
  61. import {take} from 'rxjs/operator/take';
  62. import {map} from 'rxjs/operator/map';
  63. import {throttle} from 'rxjs/operator/throttle';
  64. import {takeUntil} from 'rxjs/operator/takeUntil';
  65. function test(observable) {
  66. return observable
  67. ::filter(data => data.someTest)
  68. ::throttle(() =>
  69. interval(10)
  70. ::take(1)
  71. ::takeUntil(observable::filter(data => someOtherTest))
  72. )
  73. ::map(someFunction);
  74. }
  75. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  76. import { interval } from "rxjs/observable/interval";
  77. import { filter } from "rxjs/operator/filter";
  78. import { take } from "rxjs/operator/take";
  79. import { map } from "rxjs/operator/map";
  80. import { throttle } from "rxjs/operator/throttle";
  81. import { takeUntil } from "rxjs/operator/takeUntil";
  82. function test(observable) {
  83. return observable
  84. ::filter(data => data.someTest)
  85. ::throttle(() =>
  86. interval(10)
  87. ::take(1)
  88. ::takeUntil(observable::filter(data => someOtherTest))
  89. )
  90. ::map(someFunction);
  91. }
  92. `;
  93. exports[`method_chain.js 2`] = `
  94. import {interval} from 'rxjs/observable/interval';
  95. import {filter} from 'rxjs/operator/filter';
  96. import {take} from 'rxjs/operator/take';
  97. import {map} from 'rxjs/operator/map';
  98. import {throttle} from 'rxjs/operator/throttle';
  99. import {takeUntil} from 'rxjs/operator/takeUntil';
  100. function test(observable) {
  101. return observable
  102. ::filter(data => data.someTest)
  103. ::throttle(() =>
  104. interval(10)
  105. ::take(1)
  106. ::takeUntil(observable::filter(data => someOtherTest))
  107. )
  108. ::map(someFunction);
  109. }
  110. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  111. import { interval } from "rxjs/observable/interval"
  112. import { filter } from "rxjs/operator/filter"
  113. import { take } from "rxjs/operator/take"
  114. import { map } from "rxjs/operator/map"
  115. import { throttle } from "rxjs/operator/throttle"
  116. import { takeUntil } from "rxjs/operator/takeUntil"
  117. function test(observable) {
  118. return observable
  119. ::filter(data => data.someTest)
  120. ::throttle(() =>
  121. interval(10)
  122. ::take(1)
  123. ::takeUntil(observable::filter(data => someOtherTest))
  124. )
  125. ::map(someFunction)
  126. }
  127. `;
  128. exports[`short_name_method.js 1`] = `
  129. class X {
  130. constructor() {
  131. this.shortMethod = ::this.shortMethod;
  132. }
  133. shortMethod() {
  134. return true;
  135. }
  136. }~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  137. class X {
  138. constructor() {
  139. this.shortMethod = ::this.shortMethod;
  140. }
  141. shortMethod() {
  142. return true;
  143. }
  144. }
  145. `;
  146. exports[`short_name_method.js 2`] = `
  147. class X {
  148. constructor() {
  149. this.shortMethod = ::this.shortMethod;
  150. }
  151. shortMethod() {
  152. return true;
  153. }
  154. }~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  155. class X {
  156. constructor() {
  157. this.shortMethod = ::this.shortMethod
  158. }
  159. shortMethod() {
  160. return true
  161. }
  162. }
  163. `;