Upgrade to Pro — share decks privately, control downloads, hide ads and more …

@swc-node/jest を使って テストを高速化する/jsfes-2022

@swc-node/jest を使って テストを高速化する/jsfes-2022

Kenichiro Kishida

July 16, 2022
Tweet

More Decks by Kenichiro Kishida

Other Decks in Technology

Transcript

  1. Նͷ+BWB4DSJQUࡇΓ0OMJOF ,FOJDIJSP,JTIJEB !TJ[VIJLP !TXDOPEFKFTU Λ࢖ͬͯ ςετΛߴ଎Խ͢Δ

  2. ,FOJDIJSP,JTIJEB Ӭ࿨ͷσΟεςΟϯάΠογϡτɾΤϯδχΞ੍౓ʹ͓͚Δ %JTUJOHVJTIFE$SFBUPS TJ[VIJLP!HNBJMDPN !TJ[VIJLP IUUQTHJUIVCDPNTJ[VIJLP IUUQCMPHPQFOUPLZPKQ

  3. https://blog.open.tokyo.jp/2021/07/11/pong-swoosh.html PR

  4. PR ΋͠Α͚Ε͹ࢀՃ͍ͯͩ͘͠͞

  5. None
  6. None
  7. w5ZQF4DSJQUΛ࢖͍ͬͯΔɺ·ͨ͸͜Ε͔ Β࢖͓͏ͱࢥ͍ͬͯΔ wࣗಈςετΛॻ͍͍ͯΔɺ·ͨ͸͜Ε͔Β ॻ͘༧ఆͰ͋Δ w$*ͷ͕͔͔͍࣌ؒͬͯΔɺ·ͨ͸΋ͬͱ଎ ͍ͨ͘͠ͱࢥ͍ͬͯΔ ຊ೔ͷλʔήοτϢʔβʔ

  8. None
  9. ts-jest

  10. None
  11. ܕνΣοΫʜ

  12. TypeScript Jest ߴ଎Խ

  13. SWC esbuild

  14. w(PͰ࣮૷͞Ε͍ͯΔ wϑϩϯτΤϯυ։ൃͰ࢖ΘΕΔ͜ͱ͕ଟ͍ w7JUFͰ࢖ΘΕ͍ͯΔ wσίϨʔλ͕࢖͑ͳ͍ FTCVJME

  15. w3VTUͰ࣮૷͞Ε͍ͯΔ w%FOPͰ࢖ΘΕ͍ͯΔ wσίϨʔλ͕࢖͑Δ 48$

  16. ๻ͨͪ͸ʜ wNJDSPTPGUUTZSJOHF w5ZQF03.

  17. None
  18. .swcrc

  19. @swc-node/core @swc-node/jest tscon fi g .swcrc transformer

  20. transformSync : 
 esbuild x 510 ops/sec ±1.28% (88 runs

    sampled ) @swc-node/core x 438 ops/sec ±1.00% (88 runs sampled ) typescript x 28.83 ops/sec ±10.20% (52 runs sampled ) babel x 24.21 ops/sec ±10.66% (46 runs sampled ) Transform rxjs/AjaxObservable.ts benchmark bench suite: Fastest is esbuil d transform paralle l @swc-node/core x 1,253 ops/sec ±0.90% (75 runs sampled ) esbuild x 914 ops/sec ±1.31% (77 runs sampled ) Transform rxjs/AjaxObservable.ts parallel benchmark bench suite: Fastest is @swc-node/cor e yarn benc h @swc-node/core x 1,123 ops/sec ±0.95% (77 runs sampled ) esbuild x 847 ops/sec ±3.74% (71 runs sampled ) Transform rxjs/AjaxObservable.ts parallel benchmark bench suite: Fastest is @swc-node/cor https://github.com/swc-project/swc-node
  21. w5ZQF4DSJQUͷςετ͸଎͘ͳΔ wσίϨʔλΛ࢖͍ͬͯΔͳΒ48$Ұ୒ w!TXDOPEFΛ࢖͏ͱUTDPO fi Hͷઃఆ ͚ͩͰྑ͍ wUTDͰͷίϯύΠϧνΣοΫ͸๨Εͣʹ wৄ͘͠͸ϒϩάͰ ·ͱΊ

  22. https://blog.open.tokyo.jp/