タグ

node.jsとjaavscriptに関するmizdraのブックマーク (2)

  • CommonJS is not going away | Bun Blog

    We're hiring C/C++ and Zig engineers to build the future of JavaScript! Join our team → Some may be surprised to see the recent release notes for Bun mention CommonJS support. After all, CommonJS is a legacy module system, and the future of JavaScript is ES Modules (ESM), right? As a "forward-thinking" "next-gen" runtime, why would Bun put so much effort into improving CommonJS support? The latest

    mizdra
    mizdra 2023/07/01
    良いアンサー記事だった。ローカルで babel/core を import すると、CommonJS と ES Modules で結構差出るんだなー。
  • jestでDBありのテストを高速化する

    課題link お手伝いしているシステムでNestJSを採用しているバックエンドのテストが遅いという課題があったので対処した。 前提link フレームワークDBテストランナーその他 テストの総数は700弱。 最終結果link 最終的には2段階の改修を経てローカルのテストが3倍速程度高速化した。 # before Test Suites: 145 passed, 145 total Tests: 2 skipped, 681 passed, 683 total Snapshots: 0 total Time: 925.063 s Ran all test suites. Done in 926.48s. # ts-jestを@swc/jestに置き換えた Test Suites: 145 passed, 145 total Tests: 2 skipped, 681 passed, 683 t

    jestでDBありのテストを高速化する
    mizdra
    mizdra 2022/07/09
    "ローカルでもshardオプションで実行しても良かったが、shardで分割すると結果も分割されて表示されてしまう... (中略)... ローカルではmaxWorkers、CIはshardというのがよいのでは" / なるほど
  • 1