GitHub About us Blog Contact & support GitHub Enterprise Site status Applications GitHub for Mac GitHub for Windows GitHub for Eclipse GitHub mobile apps Services Gauges: Web analytics Speaker Deck: Presentations Gist: Code snippets Job board... 続きを読む
$ npm install grunt grunt-contrib grunt-simple-mocha --save-dev module.exports = (grunt) -> grunt.loadNpmTasks 'grunt-contrib' grunt.loadNpmTasks 'grunt-simple-mocha' grunt.initConfig connect: server: options: port: 8888 base: '.' watch: coff... 続きを読む
node.jsTravis-CIでブラウザのテストできないのかなー、できないよなーと思いつつ、いろいろ探してみたら出来るような事を知り、今ホット(なのかな?)なtestemを使う事でmochaでのテストも実行できるらしい!という事を知ったので試してみました。 準備packag... 続きを読む
Presented at the Burlington Ruby Conference on July 28th. Learn just how easy it is to test you...すべて表示 Presented at the Burlington Ruby Conference on July 28th. Learn just how easy it is to test your JavaScript and CoffeeScript code. Do... 続きを読む
In Agile development, developers write tests before the implementing a feature. Unit tests should already be in your ADN, so let's talk about functional tests instead. Functional tests are the technical translation of the acceptance tests wri... 続きを読む
Recently, I’ve been doing a considerable amount of CoffeeScript work. One problem I ran into early-on was testing: I didn’t want to have to manually convert my CoffeeScript to JavaScript before I could test it. Instead, I wanted to test fro... 続きを読む
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n... 続きを読む
東京Node学園祭2012 アドベントカレンダーの9日目です。Node.jsとほとんど関係ないうえに内容がけっこう薄い感じなった気がするんですけど気にせずいこうと思います。 フロントエンドのJavaScriptをテストするとき最近はいつもmochaを使ってるんですが、やはりJ... 続きを読む
nodeのアプリケーションに対するテストをmochaで書いていて、railsのアプリケーションに対するテストをrspecだとこう書くけどこれはmochaではどうすればいいのだろう、というのが幾つかあったので書き留めておきます。今回解説に使うコードは全てgithubにあるの... 続きを読む
Node.js6連投. 第5弾! Node.js もしくはブラウザ上で動く JavaScript テストフレームワーク『Mocha』の使い方について書きます. 最近, JavaScript による大規模開発も増えてきました. それに比例して重視されてくるのが, テスト環境の構築です. そこで, node.... 続きを読む
こんにちは KOBA789 です。最近はおうちクラウドにご執心です。あ、おうちクラウドについては後日書きますね(伏線)。 mocha でカバレッジが取れると聞いて ほうほう。それでそれで? mocha --reporter html-cov > coverage.html && open coverage.html あれー、... 続きを読む
The Mocha JavaScript test framework has hit 1.0 with a bunch of great contributions from the community, here’s the change log: Added js API. Closes #265 Added: initial run of tests with --watch. Closes #345 Added: mark location as a global o... 続きを読む
Today Paul Campbell asked on Twitter about the possibility of having an automated testing scenario using WebStorm and Mocha. Although there’s nothing built in to WebStorm to support this, it’s actually very simple to setup. All we need are ... 続きを読む
node npm install mocha -g npm install should mochaの--watchオプションが期待通り動けば問題ないんだけど、ホットリロード動いてないのでファイル監視はwatchrでやらせることにした。 guardでもよかったんだけど、guardは皆決まりきったサンプル動かしてる人... 続きを読む
Testing Socket.IO With Mocha, Should.js and Socket.IO Client Jan 28th, 2012 I’m currently in the midst of creating an application that utilizes Socket.IO for real-time communication between users. Using mocha and should.js I was able to test... 続きを読む
Monday, January 23, 2012 JavaScript Testing with Mocha JavaScript is a neat and powerful language. Sure it has its flaws, but serious software can be developed with it. The way I prefer developing JavaScript applications is by test driving th... 続きを読む
javascript, node.js, testing先日、Stylusのコードをいじってたらグローバルリークがあったので、修正してPullリクエストしました。(TJが即マージしてリリース済みだよ!)リークを見つけたのは、StylusのテストコードにGlobalオブジェクト汚染を検出するテス... 続きを読む
2011年12月21日23:41 Node.jsのテスティングフレームワーク「Mocha」(後編) カテゴリプログラムJavascript 前回に引き続き、Mochaのチュートリアルに沿ってMocha(バージョン0.3.6)を使ってみます。なお、このエントリーはJavaScript Advent Calendar 2011(N... 続きを読む
2011年12月19日23:16 Node.jsのテスティングフレームワーク「Mocha」(前編) カテゴリプログラムJavascript Mochaのチュートリアルに沿ってMocha(読み:もか)を使ってみました。長いので前編・後編の二部構成にします。使用するMochaのバージョンは0.3.6です... 続きを読む
node.js | 12:18 最近、mocha をつかってテストを書くのが楽しくなってきたました。でも、テストの数が増えてくるとローカルでの実行だけでなく、CI 環境が欲しくなりますよね。github にあげられるようなプロジェクトだったら、Travis CI も良いですが、実際... 続きを読む