You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
morishitaです。 時々、業務で使うツールをGASで作ります。 これまでのものはキャンペーン対応のものなど使い捨てとまでは言わないまでも、短い運用期間を想定したものでした1。 サービスレベル的にはベータレベルですが、少し運用期間が長くなりそう、かつプロトタイプ性が強くて変更が継続しそうなツールを作ることになったので、ちゃんとテストしようと思ってやってみました。 試したもの 次の要素を含むGASのプロジェクトでJestのユニットテストを導入しました。 @google/clasp 2.1.0 jest 24.8.0 Typescript ついでにこれも。 eslint 6.0.1 + @typescript-eslint/eslint-plugin 1.11.0 紹介するサンプルコードはこちらです。 gas-ts-jest-eslint-sample セットアップ 何はともあれ、必要なN
JestいいですよねJest。 あれこれプラグインとかライブラリとか入れなくてもだいたいのことができて。 さて、この1ヶ月くらいひたすらJestでテストを書き続けて、ハマったとこをメモ。 逆に言えば、ここに書いてないことでは一切困ってなくて、Jest最高って感じ。 Karmaみたいなブラウザでテストする機能さえつけばもう一生ついていきます感すらある。 before / afterでもasync Docsにそれらしいコードはないけどできる。 beforeAll(done => { // some async tasks done(); }); beforeEach(async () => { await asyncTask(); }); afterEach(async done => { await asyncTask(); asyncTask2(done); }); afterAll(()
If you plot the commit count of each project over time it’s clear that QUnit and Jasmine are the oldest projects, and also that there is a very large amount of commits landing in the Jest repository right now (and have been for quite some time now) compared to all the other frameworks: Another interesting thing to look at is the weekly download count on npm for each framework over time; Mocha is t
を晒すことで俺以外が試してくれるかもしれない!というのは置いといて、現在の知見です。 MV* React | A JavaScript library for building user interfaces Facebook製データバインディング。jsxという謎拡張子に目をつむれば未来を感じる設計。とにかく生DOM触りたくないという気概を感じる。 Welcome - Polymer Google製WebComponent。WebComponent使うならこれが有望株っぽい。 component/component MV* とはちょっと違うけどCSS/JavaScript/HTML まとめてライブラリにできる。JavaScript以外もライブラリに含む際は有望。 何がしたいかはt_wadaさんがまとめてくれたtogetterみてください。Web フロントエンド開発用パッケージマネージャ c
Jest is a delightful JavaScript Testing Framework with a focus on simplicity.
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く