モジュールのロードまわり lib/sinon.js がモジュールのエンドポイント sinon object の作成、環境に応じた初期化、ユーティリティメソッドの定義を行う spy や mock などの機能毎にファイルが分かれる lib/sinon/*.js に配置 lib/sinon/spy.js など sinon.js 大きくは以下のように sinon object を作って返す。 var sinon = (function() { function somePrivateFunction() {}; var sinon = { foo: function foo() {} }; return sinon; }()); node の場合、ブラウザの場合、busterjs の場合で異なった初期化を行う。 node の環境かどうかの判定は module.exports の有無で行う。 var
I’ve been checking out Pyret, the new language from the same guys that made Racket. Even if it is designed to be for education, it has a syntax I love and some really cool features, like the possibility of adding in-line unit tests to your functions. This feature in particular looks like this: fun square(n): n * n where: square(2) is 4 square(4) is 16 square(8) is 64 1+1 end Neat, huh? The where c
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
We are making WebStorm 7.0.2 Release Candidate available for update and download now. Finally, we are ready to show you Mocha support in WebStorm. You can run tests with this simple, but yet powerful JavaScript test framework in one click right in the IDE. Also quite a lot of work was done to improve the support for Google Dart. The full list of updates and fixes is available in the release notes.
jasmine-parameterizeというのを作りました。 背景 「パラメータだけ違って他が同じ」ようなテストを簡潔に書きたい場合があります。 これを実現するために「パラメータ」と「テスト本文」を切り分けるように書く仕組みが パラメタライズドテストってやつだと思っているんですが、この辺の理解は自信ないです。 このパラメタライズドテストを行うための機構がJasmineにはなくて、 プラグインも良さそうなのを見つけられなかったので自分で作りました。 (ちなみにQUnitにはプラグインあります) 簡単なfizzbuzzテストを例に取ります。 テストの書き方が主目的なのでfizzbuzzとは何かには触れません。 まず標準のJasmineだけで愚直に書くとこうなります。 describe('fizzbuzz()', function() { it('sample', function() { e
Karma or Protractor Karma is a JavaScript test-runner built with Node.js and meant for unit testing. The Protractor is for end-to-end testing and uses Selenium Web Driver to drive tests. Both have been made by the Angular team. You can use any assertion-library you want with either. Screencast: Karma Getting started related: Should I be using Protractor or Karma for my end-to-end testing? Can Prot
Apps, suites, and examples for Backbone.js test development. Introduction This site provides materials and resources for developing and testing Backbone.js web applications. All of the application and test examples for the book Backbone.js Testing can be found here, grouped by chapter. We also provide a reference Backbone.js application - Notes - for creating and viewing notes, which we use throug
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く