jsfmt.spec.js.snap 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. // Jest Snapshot v1, https://goo.gl/fbAQLP
  2. exports[`lang-ts.vue 1`] = `
  3. <template>
  4. <div>{{foo}}</div>
  5. </template>
  6. <script lang="ts">
  7. export default {
  8. computed: { foo( ): string { return "foo"; }, },
  9. }
  10. </script>
  11. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  12. <template>
  13. <div>{{foo}}</div>
  14. </template>
  15. <script lang="ts">
  16. export default {
  17. computed: {
  18. foo(): string {
  19. return "foo";
  20. }
  21. }
  22. };
  23. </script>
  24. `;
  25. exports[`lang-tsx.vue 1`] = `
  26. <script lang="tsx">
  27. import {VNode} from "vue"
  28. export default {
  29. computed: { foo( ):string { return "foo" }, },
  30. render(h):VNode { return <div>{ this.foo }</div> },
  31. }
  32. </script>
  33. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  34. <script lang="tsx">
  35. import { VNode } from "vue";
  36. export default {
  37. computed: {
  38. foo(): string {
  39. return "foo";
  40. }
  41. },
  42. render(h): VNode {
  43. return <div>{this.foo}</div>;
  44. }
  45. };
  46. </script>
  47. `;
  48. exports[`template-bind.vue 1`] = `
  49. <template>
  50. <div v-bind:id=" 'list-' + id "></div>
  51. <div v-bind:id=" rawId | formatId "></div>
  52. <div v-bind:id=" ok ? 'YES' : 'NO' "></div>
  53. <button @click=" foo ( arg, 'string' ) "></button>
  54. </template>
  55. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  56. <template>
  57. <div v-bind:id=" 'list-' + id "></div>
  58. <div v-bind:id=" rawId | formatId "></div>
  59. <div v-bind:id=" ok ? 'YES' : 'NO' "></div>
  60. <button @click=" foo ( arg, 'string' ) "></button>
  61. </template>
  62. `;
  63. exports[`template-class.vue 1`] = `
  64. <template>
  65. <h2
  66. class="title"
  67. :class="{ 'issue-realtime-pre-pulse': preAnimation,
  68. 'issue-realtime-trigger-pulse': pulseAnimation}"
  69. v-html="titleHtml"
  70. >
  71. </h2>
  72. </template>
  73. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  74. <template>
  75. <h2
  76. class="title"
  77. :class="{ 'issue-realtime-pre-pulse': preAnimation,
  78. 'issue-realtime-trigger-pulse': pulseAnimation}"
  79. v-html="titleHtml"
  80. >
  81. </h2>
  82. </template>
  83. `;
  84. exports[`vue-component.vue 1`] = `
  85. <template >
  86. <h1 >{{greeting}} world</h1 >
  87. <script>kikoo ( ) </script>
  88. </template >
  89. <script>
  90. module . exports =
  91. {data : function () {return {
  92. greeting: "Hello"
  93. }}
  94. }
  95. </script>
  96. <style scoped >
  97. p { font-size : 2em ; text-align : center ; }
  98. </style >
  99. <style lang="postcss" >
  100. p { font-size : 2em ; text-align : center ; }
  101. </style >
  102. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  103. <template >
  104. <h1 >{{greeting}} world</h1 >
  105. <script>kikoo ( ) </script>
  106. </template >
  107. <script>
  108. module.exports = {
  109. data: function() {
  110. return {
  111. greeting: "Hello"
  112. };
  113. }
  114. };
  115. </script>
  116. <style scoped >
  117. p {
  118. font-size: 2em;
  119. text-align: center;
  120. }
  121. </style >
  122. <style lang="postcss" >
  123. p {
  124. font-size: 2em;
  125. text-align: center;
  126. }
  127. </style >
  128. `;