Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
TDD With Ember.js
Search
Kerrick Long
March 06, 2014
Programming
0
1.3k
TDD With Ember.js
Kerrick Long
March 06, 2014
Tweet
Share
More Decks by Kerrick Long
See All by Kerrick Long
15 Things You Shouldn't Do In Ember Anymore
kerrick
0
1.2k
The ECMAScript formerly known as 6
kerrick
0
1.3k
CSS Study Group 1
kerrick
0
1.3k
CSS Study Group 2
kerrick
1
1.1k
Services & Component Collaboration
kerrick
0
800
Donate STL #Build4STL Hackathon Keynote
kerrick
0
390
Donate STL
kerrick
0
820
JavaScript Promises - Thinking Sync in an Async World
kerrick
20
8.3k
Other Decks in Programming
See All in Programming
16年目のピクシブ百科事典を支える最新の技術基盤 / The Modern Tech Stack Powering Pixiv Encyclopedia in its 16th Year
ahuglajbclajep
5
1k
Oxlintはいいぞ
yug1224
5
1.3k
AI Schema Enrichment for your Oracle AI Database
thatjeffsmith
0
280
CSC307 Lecture 03
javiergs
PRO
1
490
AIフル活用時代だからこそ学んでおきたい働き方の心得
shinoyu
0
130
AIによる高速開発をどう制御するか? ガードレール設置で開発速度と品質を両立させたチームの事例
tonkotsuboy_com
7
2.3k
izumin5210のプロポーザルのネタ探し #tskaigi_msup
izumin5210
1
120
コントリビューターによるDenoのすゝめ / Deno Recommendations by a Contributor
petamoriken
0
200
Implementation Patterns
denyspoltorak
0
290
並行開発のためのコードレビュー
miyukiw
0
150
そのAIレビュー、レビューしてますか? / Are you reviewing those AI reviews?
rkaga
6
4.6k
FOSDEM 2026: STUNMESH-go: Building P2P WireGuard Mesh Without Self-Hosted Infrastructure
tjjh89017
0
170
Featured
See All Featured
ラッコキーワード サービス紹介資料
rakko
1
2.3M
Faster Mobile Websites
deanohume
310
31k
The untapped power of vector embeddings
frankvandijk
1
1.6k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3.3k
Product Roadmaps are Hard
iamctodd
PRO
55
12k
Believing is Seeing
oripsolob
1
55
Mobile First: as difficult as doing things right
swwweet
225
10k
Large-scale JavaScript Application Architecture
addyosmani
515
110k
Statistics for Hackers
jakevdp
799
230k
The Cult of Friendly URLs
andyhume
79
6.8k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
190
Chasing Engaging Ingredients in Design
codingconduct
0
110
Transcript
Test Driven Development
Kerrick Long Things I make and do Where to find
me online twitter.com/KerrickLong github.com/Kerrick Lead Front-end Developer at Second Street KerrickLong.com www. meetup.com/STLEmber
Why TDD?
Outside-In
Integration Tests Unit Tests then
Red Green Refactor
Green Refactor
Test-Driven Design
How?
Integration Test
Integration Test
Integration Test Unit Test
Integration Test Unit Test
Integration Test Unit Test Unit Test Unit Test
Integration Test Unit Test Unit Test Unit Test
Integration Test Unit Test Unit Test Unit Test Unit Test
Integration Test Unit Test Unit Test Unit Test Unit Test
Integration Test Unit Test Unit Test Unit Test Unit Test
Integration Test Unit Test Unit Test Unit Test Unit Test
Integration Test Unit Test Unit Test Unit Test Unit Test
Tooling
Karma Test Runner
None
None
None
None
QUnit.js
Assertions
QUnit.assert.ok( makeBoolean() ) Assertions
QUnit.assert.equal( makeTen(), '10' ) Assertions
QUnit.assert.strictEqual( makeTen(), 10 ) Assertions
QUnit.assert.deepEqual( makeObject(), { foo: ‘bar’, baz: 10 } ) Assertions
QUnit.assert.propEqual( makeObject(), { foo: ‘bar’, baz: 10 } ) Assertions
QUnit.assert.throws( function() { throwError() }, ‘Example Thrown Error’ ) Assertions
Ember Test Helpers
App.rootElement = ‘#qunit-fixture’ App.setupForTesting() App.injectTestHelpers(QUnit)
QUnit.visit(‘/posts’)
QUnit.find(‘.add’, ‘.list’)
QUnit.fillIn( ‘.name’, ‘Kerrick’ )
QUnit.click(‘.submit’)
QUnit.keyEvent( ‘.wysiwyg’, ‘keypress’, 30 )
QUnit.visit(‘/posts/new’) .fillIn(‘.name’, ‘Hello’) .click(‘.submit’) .then(function() { QUnit.assert.ok(true) })
QUnit.visit(‘/posts/new’) QUnit.fillIn(‘.name’, ‘Hi’) QUnit.click(‘.submit’) QUnit.andThen(function() { QUnit.assert.ok(true) })
QUnit.visit(‘/posts/new’) QUnit.fillIn(‘.name’, ‘Hi’) QUnit.click(‘.submit’) QUnit.andThen(function() { QUnit.assert.ok(true) })
Integration Tests
Controller Unit Tests
Component Unit Tests
Mixin Unit Tests
Component Unit Tests