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
Welcome! Are you writing JavaScript tests and in the market for a mocking library to fake out real things for you? testdouble.js is an opinionated, carefully-designed test double library maintained by, oddly enough, a software agency that's also named Test Double. (The term "test double" was coined by Gerard Meszaros in his book xUnit Test Patterns.) If you practice test-driven development, testdo
== 1.4.0 / 2012-07-09 * Argument matchers (Maximillian Antoni) sinon.match.{any, same, typeOf, instanceOf, has, hasOwn, defined, truthy, falsy} as well as typeOf shortcuts for boolean, number, string, object, function, array, regexp and date. The result of a call can be used with spy.calledWith. * spy.returned now works with matchers and compares objects deeply. * Matcher assertions: calledWithMat
This is the first bold step towards getting rid of all kinds of annoying packaging troubles with Sinon.JS. This allows the source code to be developed as a regular node.js module, and eventually package everything up in a umd-style wrapper for the browser using browserify. In this first step there are several things that need attention: 1. I have not attempted to run this in a browser, or even bui
■ [JavaScript][Sinon.JS]Sinon.JSのstubについて Sinonのstubに関するドキュメントはここです。 そもそもstubとは Test stubs are functions (spies) with pre-programmed behavior. They support the full test spy API in addition to methods which can be used to alter the stub's behavior. As spies, stubs can be either anonymous, or wrap existing functions. When wrapping an existing function with a stub, the original function is not calle
モジュールのロードまわり 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
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く