jsfmt.spec.js.snap 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. // Jest Snapshot v1, https://goo.gl/fbAQLP
  2. exports[`extends.js 1`] = `
  3. // "ArrowFunctionExpression"
  4. class a extends (() => {}) {}
  5. // "AssignmentExpression"
  6. class a extends (b = c) {}
  7. // "AwaitExpression"
  8. async function f() {
  9. class a extends (await b) {}
  10. }
  11. // "BinaryExpression"
  12. class a extends (b + c) {}
  13. // "CallExpression"
  14. class a extends b() {}
  15. // "ClassExpression"
  16. class a extends class {} {}
  17. // "ConditionalExpression"
  18. class a extends (b ? c : d) {}
  19. // "FunctionExpression"
  20. class a extends (function() {}) {}
  21. // "LogicalExpression"
  22. class a extends (b || c) {}
  23. // "MemberExpression"
  24. class a extends b.c {}
  25. // "NewExpression"
  26. class a extends (new B()) {}
  27. // "ObjectExpression"
  28. class a extends ({}) {}
  29. // "SequenceExpression"
  30. class a extends (b, c) {}
  31. // "TaggedTemplateExpression"
  32. class a extends \`\` {}
  33. // "UnaryExpression"
  34. class a extends (void b) {}
  35. // "UpdateExpression"
  36. class a extends (++b) {}
  37. // "YieldExpression"
  38. function* f() {
  39. // Flow has a bug parsing it.
  40. // class a extends (yield 1) {}
  41. }
  42. x = class extends (++b) {}
  43. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  44. // "ArrowFunctionExpression"
  45. class a extends (() => {}) {}
  46. // "AssignmentExpression"
  47. class a extends (b = c) {}
  48. // "AwaitExpression"
  49. async function f() {
  50. class a extends (await b) {}
  51. }
  52. // "BinaryExpression"
  53. class a extends (b + c) {}
  54. // "CallExpression"
  55. class a extends b() {}
  56. // "ClassExpression"
  57. class a extends class {} {}
  58. // "ConditionalExpression"
  59. class a extends (b ? c : d) {}
  60. // "FunctionExpression"
  61. class a extends function() {} {}
  62. // "LogicalExpression"
  63. class a extends (b || c) {}
  64. // "MemberExpression"
  65. class a extends b.c {}
  66. // "NewExpression"
  67. class a extends (new B()) {}
  68. // "ObjectExpression"
  69. class a extends ({}) {}
  70. // "SequenceExpression"
  71. class a extends (b, c) {}
  72. // "TaggedTemplateExpression"
  73. class a extends \`\` {}
  74. // "UnaryExpression"
  75. class a extends (void b) {}
  76. // "UpdateExpression"
  77. class a extends (++b) {}
  78. // "YieldExpression"
  79. function* f() {
  80. // Flow has a bug parsing it.
  81. // class a extends (yield 1) {}
  82. }
  83. x = class extends (++b) {};
  84. `;