Get full access to JavaScript Testing with Jasmine and 60K+ other titles, with a free 10-day trial of O'Reilly. There are also live events, courses curated by job role, and more.
Had been looking at the jsunit and jcoverage demos here (click on coverage report link. Open this in a new tab). I was wondering if any one had done anything similar with Jasmine and JSCoverage ? I'm a little unsure on how to proceed. [EDIT] I am wondering if there is something I can do with a jasmine reporter. My Jasmine "hello world" example makes reference to a TrivialReporter. Maybe this can b
Initial Ruby on Rails application The initial rails application can be downloaded from github repo: 000-basic-app@tdd-with-backbonejs The basic application provides model Task(name: string, complete: boolean) and corresponding controller with RESTFUL json interface: GET /tasks.json POST /tasks.json PUT /tasks/:id.json Don’t forget about rake db:create:all and rake db:migrate. You could seed the da
describe("Jasmine", function() { it("makes testing JavaScript awesome!", function() { expect(yourCode).toBeLotsBetter(); }); }); Documentation User Guide Release Notes API Documentation Contributor Guide Download For pure JavaScript projects: VersionSizeDateSHA1
Ruby, JavaScript, Sass, iOS. Stinky Cheese & Beer Advocate. Working at CustomInk and loving it! In my previous article I talked a little bit about why I decided to use Spine.JS and how to include the CoffeeScript source into your Rails project using git submodules. Now I would like to talk about testing your brand new Spine.JS application. Afterward, be sure to read the second part to this article
February 28, 2012 This article will be appearing in my forthcoming book on Backbone.js and continues the section on unit testing. We previously looked at Jasmine and will now look at QUnit and SinonJS. QUnit is a powerful JavaScript test suite written by jQuery team member Jörn Zaefferer and used by many large open-source projects (such as jQuery and Backbone.js) to test their code. It’s both capa
bundle rails g jasmine:install rails g jasmine:examples rake jasmine # Open browser open http://localhost:8888/ rails g jasmine:examples で生成したスクリプトは削除してよい。 spec の書き方 ここでは coffeescript で書いてるので後述の「spec を coffeescript で書く」参照。 matcher の一覧 jasmine-jquery 導入 jasmine のみだと dom の絡む機能のテストを書く際に、createElement などでせっせと dom ツリーを作らないといけないし、関連するマッチャも用意しないといけない。 そのへんを省力化するためのツールが jasmine-jquery。 https://github.com/
Railsデベロッパーの多くはアプリケーションのRubyコードをテストすることの重要性を理解しています。しかし多くの場合JavaScriptについてはブラウザでアプリケーションを実行してエラーを確認するだけの手動テストで済まされてしまいます。ウェブアプリケーションがますます複雑化しクライアント側に多くの機能を持つようになる中で、JavaScriptコードを自動的にテストする方法を持つことが望まれます。今回のエピソードでは、そのための一つの方法を見ていきます。 対象のアプリケーションを以下に示します。標準的な注文フォームで、クレジットカード番号を入力するテキストフィールドを持っています。このフィールドにクライアント側で動作する検証機能を追加して、フィールドがフォーカスを失うときに入力された番号が検証されるようにしようと思います。 完全なクレジットカード番号の入力検証機能を追加するわけではあり
Testing Backbone applications with Jasmine and Sinon Part 1: Introduction 3 March 2011 Overview This is the first in a series of articles demonstrating how to test a Backbone.js application, employing the Jasmine BDD test framework and the Sinon.JS spying, stubbing and mocking library. In this part, we’ll take a brief look at Backbone, and then move on to an introduction to some of the features of
前提として、 CoffeeScript は名前に反して言語じゃないので(そうぼくは思っている)、近いところで言うとコードジェネレーターとかフレームワークとか? ということであんまり宗教的にこだわるところでもなさそうで、便利な場面では使えば良いし、 JavaScript でしか表現できない箇所は素直に JavaScript で書けば良いと思う。だって、共存できるし。 http://subtech.g.hatena.ne.jp/cho45/20120402/1333366338 読みやすいとか読みにくいとかは主観っぽい(ぼくは読みにくいと感じたことがない)のでよくわからない。慣れの問題もありそう。むしろぼくは、 Java に文法の似ているプレーンな JavaScript のほうが、特にあんまり長いコードベースを読もうとすると、ウワッてなる(個人の感想です)。 デバッグとかメンテナンス性は Ja
This document discusses using CoffeeScript, Backbone.js, and Jasmine BDD to build single page web applications. It begins by explaining why CoffeeScript is useful for cleaning up JavaScript code and avoiding errors. It then discusses how Backbone.js provides structure for single page apps by defining models, collections, views and routers. It notes that Backbone works well with CoffeeScript. Final
Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit sed quia consequu
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く