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
Angular JSapplications with ES6 modulesTesting of Angular JS application used to be quite painful especially when using “official” solutions like Karma or Protractor. ES6 (aka ES2015, aka new Javascript release) changed this by introducing standardized module syntax. This enables us to do real unit testing of Angular JS constructs like controllers, factories or services in a very simple and fast f
今回power-doctestをシンプルなものへと作りなおしました。 rewrite simply by azu · Pull Request #11 · azu/power-doctest 1.0未満のバージョンはツール自体に変換したコードの実行=>レポート表示の機能があったのですが、そこを削除して変換のみを行うように書き換えました。 実行機能はやっぱりとても複雑で、Nodeだけでも結構制御が大変なので、単純にassertに変換して後は他のツールと組み合わせて実行できるような形がいいかなと思いました。 使い方 azu/power-doctest さきほども書いたように変換機能しかないのでライブラリとして使うのがいい気がしますが、単純なファイルを指定して変換するCLIの機能だけは入っています。
Tests are absolutely a must. Without tests, it is not possible to evolve software. Yet, tests are additional code to write and maintain. And they break; which is great if they do to inform us that we were about to introduce a defect in our API; frustrating (to use a euphemism) otherwise. Software testing is defined as the process of determining the correctness of software under the assumption of s
ロジック、E2E、描画、音、動画、Example、文章 - 色々なJSテスト 自己紹介 Name : azu Twitter : @azu_re Website: Web scratch, JSer.info ロジックテスト 解決したい問題 コードのロジックを確かめたい 解決する方法 Mocha、Jasmineなどでユニットテストを書く よくあることなので E2Eテスト 解決したい問題 動いてるサイトのコードを変更したい だが手元にそのサイトを動かす手順がない 動いてる本番のサイトはある 解決する方法 node-CocProxy + Karma KarmaにproxyとしてCocProxyを挟む ローカルのコードを本番サイト上のものとすり替える ProtractorでE2Eテストを書く 画像のテスト 解決したい問題 画像同士を差異をチェックしたい 解決する方法 js-imagediffやB
UPDATE: I now use RITEway instead of Tape. It’s wrapper around Tape to make it even simpler to write great unit tests which provide clear bug reports when they fail. See “Rethinking Unit Test Assertions” for more details. TL;DR: Mocha is a $150k Porsche Panamera when the best tool for the job is a $30k Tesla Model 3. Don’t waste your resources on testing bells and whistles. Invest them in creating
I held a survey last monday where I asked for feedback about the kinds of things you want me to write about. It was quite useful, and one of the topics that seem to interest quite a few people is regarding module testing. Using tape, proxyquire, and sinon is the best possible combination of modules when it comes to testing JavaScript applications, regardless of them being server-side or front-end
Chakram is a REST API testing framework offering a BDD testing style and fully exploiting promises Simple API Testing Chakram allows you to write clear and comprehensive tests, ensuring JSON REST endpoints work correctly as you develop and in the future HTTP Assertions Chakram extends Chai.js, adding HTTP specific assertions. It allows simple verification of returned status codes, the compression
ES6 で書かれたコードをユニット テストしたい。できればテスト自体も ES6 で。という希望を実現してくれそうなツールがあったので試してみる。 mocha ユニット テストには mocha を利用する。業務で Node モジュールのテストに利用していて馴染みがあるのと後述する espower-babel が mocha を想定しているのがその理由。 mocha を npm test や npm run から利用するならインストールはローカルだけでよい。package.json 管理下にある npm にはパスが通った状態になる。 余談だが以下の記事を読んで gulp などもローカルにインストールして実行を npm で抽象化するほうがよいのでは?と考えるようになった。 npm で依存もタスクも一元化する 記事中にもメリットとして説明されているとおり利用者は npm だけ覚えればよい。グローバ
My team at Opower has gone through several evolutions of our testing philosophy. Although I now feel confident that we are now testing the right set of contracts, we’ve made some mistakes along the way. I’d like to share those lessons learned with you. It’s ok to duplicate config for tests.I used to write a lot of tests like this: This is three files represented in one gist, for clarity. The asser
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く