タグ

関連タグで絞り込む (1)

タグの絞り込みを解除

Mochaに関するkorinchanのブックマーク (4)

  • ES6 コードをテストする - アカベコマイリ


    ES6   ES6  mocha   mocha  Node  espower-babel  mocha  mocha npm test npm run package.json npm   gulp npm npm  npm 
  • Mocha - the fun, simple, flexible JavaScript test framework

    simple, flexible, fun Mocha is a feature-rich JavaScript test framework running on Node.js and in the browser, making asynchronous testing simple and fun. Mocha tests run serially, allowing for flexible and accurate reporting, while mapping uncaught exceptions to the correct test cases. Hosted on GitHub. # SponsorsUse Mocha at Work? Ask your manager or marketing team if they’d help support our pro

  • gulpで自動テストとコード圧縮 - Qiita

    gulp-mochaというモジュールを使う。 そもそもmocha使ったことないので、そこから調べました。 参考: javascriptでテスト駆動開発 Mocha+expect.js+testem【前編】 BDDで使われるテストフレームワークぽいですね。 参考: javascriptでテスト駆動開発 Mocha+expect.js+testem【前編】 node.jsでこんなのもテストしたい!! という話 とりあえず、以下のサンプルコードを元にmocha+shouldを使ってテストする場合についてやってみました。 var math = { addition : function(a,b){ return a+b; }, multiplication : function(a,b){ return a*b; } }; module.exports = math; var should = r

    gulpで自動テストとコード圧縮 - Qiita
  • gulpを利用してmochaで書かれたテストを実行する - テノニッキ (@hideack 's diary)

    定例の2周り遅れエントリ。Castoや、STORYBOARDSではtask runnerにGruntを利用していたのですが、glupも触ってみようということで使ってみました。 最近はnode.jsでちょっとしたツールを書いていたりすることが多く、そのテストにmochaを使って書いていたりするので試しにその実行のタスクをglupで書いてみることにしました。 まずは、glupのインストール。globalで入れてコマンドラインから叩ける様にします。 $ npm install -g gulp $ gulp -v [19:28:32] CLI version 3.8.8 [19:28:32] Local version undefined 実際にgulpを使いたいプロジェクトに入って、プロジェクト直下にもインストールします。 $ cd project $ npm install gulp --sa

    gulpを利用してmochaで書かれたテストを実行する - テノニッキ (@hideack 's diary)
  • 1