内容へ移動
Cat Paw Software
ユーザ用ツール
ログイン
サイト用ツール
検索
ツール
文書の表示
以前のリビジョン
バックリンク
最近の変更
メディアマネージャー
サイトマップ
ログイン
>
最近の変更
メディアマネージャー
サイトマップ
トレース:
power-assert
この文書は読取専用です。文書のソースを閲覧することは可能ですが、変更はできません。もし変更したい場合は管理者に連絡してください。
====== power-assert ====== テスト用のすごいassertionツール。failしたときに以下のように解析する <code> 1) exsample a test 0 passing (37ms) 1 failing 1) exsample a test: AssertionError: # test/a.js:9 assert(obj.a.b.c === '3') | | | | | | | | 2 false | | Object{c:2} | Object{b:#Object#} Object{a:#Object#} [string] '3' => "3" [number] obj.a.b.c => 2 + expected - actual -false +true </code> いろんな言語に実装されているが、とりあえずnode用の話。 ==== インストール ==== npm i --save-dev power-assert intelli-espower-loader ==== 実行 ==== mocha --require intelli-espower-loader test/hoge.js 毎回オプション指定するのだるいので test/mocha.opts に <code> --require intelli-espower-loader </code> と書いておいて mocha test/hoge.js
power-assert.txt
· 最終更新:
2016/10/13 02:46
by
nullpon
ページ用ツール
文書の表示
以前のリビジョン
バックリンク
文書の先頭へ