jsfmt.spec.js.snap 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547
  1. // Jest Snapshot v1, https://goo.gl/fbAQLP
  2. exports[`block-statement.hbs 1`] = `
  3. {{#block param hashKey=hashValue as |blockParam|}}
  4. Hello
  5. {{/block}}
  6. {{#block almost80CharacterLongPositionalParamThatIsFirstAlmost80Chars helloWorldParam key=here}}
  7. {{/block}}
  8. {{#block param param param param param param param hashKey=hashValue as |blockParam|}}
  9. Hello
  10. {{/block}}
  11. {{#block param param param param param param param hashKey=HashValue hashKey=hashValue}}
  12. Hello
  13. {{/block}}
  14. {{#block param param param param param param param param param param param param param}}
  15. Hello
  16. {{/block}}
  17. {{#block hashKey=HashValue hashKey=hashValue hashKey=HashValue hashKey=hashValue hashKey=HashValue}}
  18. Hello
  19. {{/block}}
  20. {{#block}}
  21. {{#block}}
  22. hello
  23. {{/block}}
  24. {{/block}}
  25. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  26. {{#block param hashKey=hashValue as |blockParam|}}
  27. Hello
  28. {{/block}}
  29. {{#block
  30. almost80CharacterLongPositionalParamThatIsFirstAlmost80Chars
  31. helloWorldParam
  32. key=here
  33. }}{{/block}}
  34. {{#block
  35. param
  36. param
  37. param
  38. param
  39. param
  40. param
  41. param
  42. hashKey=hashValue as |blockParam|
  43. }}
  44. Hello
  45. {{/block}}
  46. {{#block
  47. param
  48. param
  49. param
  50. param
  51. param
  52. param
  53. param
  54. hashKey=HashValue
  55. hashKey=hashValue
  56. }}
  57. Hello
  58. {{/block}}
  59. {{#block
  60. param
  61. param
  62. param
  63. param
  64. param
  65. param
  66. param
  67. param
  68. param
  69. param
  70. param
  71. param
  72. param
  73. }}
  74. Hello
  75. {{/block}}
  76. {{#block
  77. hashKey=HashValue
  78. hashKey=hashValue
  79. hashKey=HashValue
  80. hashKey=hashValue
  81. hashKey=HashValue
  82. }}
  83. Hello
  84. {{/block}}
  85. {{#block}}{{#block}}hello{{/block}}{{/block}}
  86. `;
  87. exports[`component.hbs 1`] = `
  88. <user-greeting @name="Ricardo" @greeting="Olá" />
  89. {{@greeting}}, {{@name}}!
  90. <button onclick={{action next}}>Next</button>
  91. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  92. <user-greeting @name="Ricardo" @greeting="Olá"></user-greeting>
  93. {{@greeting}}
  94. ,
  95. {{@name}}
  96. !
  97. <button onclick={{action next}}>
  98. Next
  99. </button>
  100. `;
  101. exports[`concat-statement.hbs 1`] = `
  102. <div class="hello {{if goodbye true}}">
  103. Hello
  104. </div>
  105. <div class="hello {{if goodbye true}} {{if goodbye false}} {{if goodbye true}} {{if goodbye false}} {{if goodbye true}}">
  106. Hello
  107. </div>
  108. <a href="/{{url}}/{{url}}"></a>
  109. <div class=" class-a{{myClass}}"></div>
  110. <div class=" class-b {{myClass}}"></div>
  111. <div class=" {{myClass}}class-c"></div>
  112. <div class=" {{myClass}} class-d"></div>
  113. <div class=" class-e{{myClass}} class-f"></div>
  114. <div class=" class-g{{myClass}}class-h "></div>
  115. <div class=" class-i {{myClass}}class-j"></div>
  116. <div class="class-k {{myClass}} class-l"></div>
  117. <div class=" class-m {{myClass}} class-n {{myClass}}class-o "></div>
  118. <div class=" class-p class-q"></div>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  119. <div class="hello {{if goodbye true}}">
  120. Hello
  121. </div>
  122. <div
  123. class="hello
  124. {{if goodbye true}}
  125. {{if goodbye false}}
  126. {{if goodbye true}}
  127. {{if goodbye false}}
  128. {{if goodbye true}}"
  129. >
  130. Hello
  131. </div>
  132. <a href="/{{url}}/{{url}}"></a>
  133. <div class="class-a{{myClass}}"></div>
  134. <div class="class-b {{myClass}}"></div>
  135. <div class="{{myClass}}class-c"></div>
  136. <div class="{{myClass}} class-d"></div>
  137. <div class="class-e{{myClass}} class-f"></div>
  138. <div class="class-g{{myClass}}class-h"></div>
  139. <div class="class-i {{myClass}}class-j"></div>
  140. <div class="class-k {{myClass}} class-l"></div>
  141. <div class="class-m {{myClass}} class-n {{myClass}}class-o"></div>
  142. <div class="class-p class-q"></div>
  143. `;
  144. exports[`element-modifier-statement.hbs 1`] = `
  145. <div {{hello param hash=key}} {{goodbye param}}>
  146. Hello
  147. </div>
  148. <div {{hello param param param param param param param param param param param param}}>
  149. Hello
  150. </div>
  151. <div {{hello hashPair=value hashPair=value hashPair=value hashPair=value hashPair=value}}>
  152. Hello
  153. </div>
  154. <div {{hello param param param param hashPair=value hashPair=value hashPair=value hashPair=value hashPair=value}}>
  155. Hello
  156. </div>
  157. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  158. <div {{hello param hash=key}} {{goodbye param}}>
  159. Hello
  160. </div>
  161. <div
  162. {{hello
  163. param
  164. param
  165. param
  166. param
  167. param
  168. param
  169. param
  170. param
  171. param
  172. param
  173. param
  174. param
  175. }}
  176. >
  177. Hello
  178. </div>
  179. <div
  180. {{hello
  181. hashPair=value
  182. hashPair=value
  183. hashPair=value
  184. hashPair=value
  185. hashPair=value
  186. }}
  187. >
  188. Hello
  189. </div>
  190. <div
  191. {{hello
  192. param
  193. param
  194. param
  195. param
  196. hashPair=value
  197. hashPair=value
  198. hashPair=value
  199. hashPair=value
  200. hashPair=value
  201. }}
  202. >
  203. Hello
  204. </div>
  205. `;
  206. exports[`element-node.hbs 1`] = `
  207. <div class="attribute" {{modifier}} {{! comment}}>
  208. Hello
  209. </div>
  210. <div>
  211. Hello
  212. </div>
  213. <div>
  214. hi
  215. </div>
  216. <div>
  217. A long enough string to trigger a line break that would prevent wrapping.
  218. </div>
  219. <div>
  220. A long enough string to trigger a line break that would prevent wrapping more.
  221. </div>
  222. <div>
  223. A long enough string to trigger a line break that would prevent wrapping more and more.
  224. </div>
  225. <div>
  226. {{#block}}
  227. {{hello}}
  228. {{/block}}
  229. </div>
  230. <div>
  231. {{hello}}
  232. </div>
  233. <div></div>
  234. <img />
  235. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  236. <div class="attribute" {{modifier}} {{! comment}}>
  237. Hello
  238. </div>
  239. <div>
  240. Hello
  241. </div>
  242. <div>
  243. hi
  244. </div>
  245. <div>
  246. A long enough string to trigger a line break that would prevent wrapping.
  247. </div>
  248. <div>
  249. A long enough string to trigger a line break that would prevent wrapping more.
  250. </div>
  251. <div>
  252. A long enough string to trigger a line break that would prevent wrapping more and more.
  253. </div>
  254. <div>
  255. {{#block}}{{hello}}{{/block}}
  256. </div>
  257. <div>
  258. {{hello}}
  259. </div>
  260. <div></div>
  261. <img />
  262. `;
  263. exports[`else-if.hbs 1`] = `
  264. {{#if a}}
  265. b
  266. {{else if c}}
  267. d
  268. {{else}}
  269. e
  270. {{/if}}
  271. {{#if a}}
  272. b
  273. {{else if c}}
  274. d
  275. {{else}}
  276. hello
  277. {{#if f}}
  278. g
  279. {{/if}}
  280. e
  281. {{/if}}
  282. {{#if a}}
  283. b
  284. {{else if c}}
  285. d
  286. {{else if e}}
  287. f
  288. {{else if g}}
  289. h
  290. {{else}}
  291. j
  292. {{/if}}
  293. <div>
  294. {{#if a}}
  295. b
  296. {{else if c}}
  297. d
  298. {{else}}
  299. e
  300. {{/if}}
  301. </div>
  302. <div>
  303. <div>
  304. {{#if a}}
  305. b
  306. {{else if c}}
  307. d
  308. {{else}}
  309. e
  310. {{/if}}
  311. </div>
  312. </div>
  313. {{#if a}}
  314. b
  315. {{else}}
  316. {{#each c as |d|}}
  317. e
  318. {{/each}}
  319. {{/if}}
  320. {{#if a}}
  321. {{#if b}}
  322. ab
  323. {{else if c}}
  324. ac
  325. {{/if}}
  326. {{/if}}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  327. {{#if a}}
  328. b
  329. {{else if c}}
  330. d
  331. {{else}}
  332. e
  333. {{/if}}
  334. {{#if a}}
  335. b
  336. {{else if c}}
  337. d
  338. {{else}}
  339. hello
  340. {{#if f}}
  341. g
  342. {{/if}}
  343. e
  344. {{/if}}
  345. {{#if a}}
  346. b
  347. {{else if c}}
  348. d
  349. {{else if e}}
  350. f
  351. {{else if g}}
  352. h
  353. {{else}}
  354. j
  355. {{/if}}
  356. <div>
  357. {{#if a}}
  358. b
  359. {{else if c}}
  360. d
  361. {{else}}
  362. e
  363. {{/if}}
  364. </div>
  365. <div>
  366. <div>
  367. {{#if a}}
  368. b
  369. {{else if c}}
  370. d
  371. {{else}}
  372. e
  373. {{/if}}
  374. </div>
  375. </div>
  376. {{#if a}}
  377. b
  378. {{else}}
  379. {{#each c as |d|}}
  380. e
  381. {{/each}}
  382. {{/if}}
  383. {{#if a}}
  384. {{#if b}}
  385. ab
  386. {{else if c}}
  387. ac
  388. {{/if}}
  389. {{/if}}
  390. `;
  391. exports[`literals.hbs 1`] = `
  392. {{mustache true}}
  393. {{mustache 5}}
  394. {{mustache undefined}}
  395. {{mustache null}}
  396. <!-- hello world -->
  397. {{! Mustache Comment}}
  398. {{!-- Mustache Comment }} --}}
  399. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  400. {{mustache true}}
  401. {{mustache 5}}
  402. {{mustache undefined}}
  403. {{mustache null}}
  404. <!-- hello world -->
  405. {{! Mustache Comment}}
  406. {{!-- Mustache Comment }} --}}
  407. `;
  408. exports[`loop.hbs 1`] = `
  409. <ul>
  410. {{#each speakers key="@index" as |speaker|}}
  411. <li>{{speaker}}</li>
  412. {{/each}}
  413. </ul>
  414. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  415. <ul>
  416. {{#each speakers key="@index" as |speaker|}}
  417. <li>
  418. {{speaker}}
  419. </li>
  420. {{/each}}
  421. </ul>
  422. `;
  423. exports[`sub-expressions.hbs 1`] = `
  424. <div
  425. {{mustache
  426. (concat
  427. (helper param hashPair=Value)
  428. (largeNameHelper param param param param hashPair=value hashPair=value hashPair=Value)
  429. hashPair=(helper param param param param param param hashPair=value hashPair=value hashPair=value)
  430. hashPair=(does not need a line break due to being under 80 chars long)
  431. )
  432. }}
  433. ></div>
  434. {{#block
  435. (concat
  436. (helper param hashPair=Value)
  437. (largeNameHelper param param param param hashPair=value hashPair=value hashPair=Value)
  438. hashPair=(helper param param param param param param hashPair=value hashPair=value hashPair=value)
  439. hashPair=(does not need a line break due to being under 80 chars long)
  440. )
  441. }}
  442. {{/block}}
  443. {{foobar-sub-component/foobar-foo
  444. hook="stringLiteral"
  445. foo=
  446. (t
  447. (concat "stringLiteral" (get blockParam "stringLiteral") hash=hash hash=hash)
  448. foo=(simple-helper (hash hashKey=blockParam.foo assignParam=blockParam.bar))
  449. )
  450. }}
  451. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  452. <div
  453. {{mustache
  454. (concat
  455. (helper param hashPair=Value)
  456. (largeNameHelper
  457. param param param param hashPair=value hashPair=value hashPair=Value
  458. )
  459. hashPair=(helper
  460. param
  461. param
  462. param
  463. param
  464. param
  465. param
  466. hashPair=value
  467. hashPair=value
  468. hashPair=value
  469. )
  470. hashPair=(does not need a line break due to being under 80 chars long)
  471. )
  472. }}
  473. ></div>
  474. {{#block
  475. (concat
  476. (helper param hashPair=Value)
  477. (largeNameHelper
  478. param param param param hashPair=value hashPair=value hashPair=Value
  479. )
  480. hashPair=(helper
  481. param
  482. param
  483. param
  484. param
  485. param
  486. param
  487. hashPair=value
  488. hashPair=value
  489. hashPair=value
  490. )
  491. hashPair=(does not need a line break due to being under 80 chars long)
  492. )
  493. }}{{/block}}
  494. {{foobar-sub-component/foobar-foo
  495. hook="stringLiteral"
  496. foo=(t
  497. (concat
  498. "stringLiteral" (get blockParam "stringLiteral") hash=hash hash=hash
  499. )
  500. foo=(simple-helper (hash hashKey=blockParam.foo assignParam=blockParam.bar))
  501. )
  502. }}
  503. `;