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
Acceptance testing in Ember.js
Search
Balint Erdi
May 08, 2014
Technology
540
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Acceptance testing in Ember.js
Balint Erdi
May 08, 2014
More Decks by Balint Erdi
See All by Balint Erdi
Data Loading Patterns with JSON API
balint
5
1.5k
Why you should consider Ember.js for your next project
balint
4
360
Data Loading Patterns in Ember
balint
1
250
Auth* in Ember apps with Torii
balint
1
330
(Somewhat) Complex Component Design – Ember.BP, 2015/02/11
balint
1
110
Complex Component Design in Ember
balint
0
410
Don't call me back - How Ember uses promises and how you can, too
balint
5
11k
Unit testing in Ember.js
balint
0
120
Introduction to ember-data
balint
0
180
Other Decks in Technology
See All in Technology
SO-101×VLAによる3色キューブのピック&プレース
abeja
0
160
生成 AI の基礎 〜 サンプル実装で学ぶ基本原理
enakai00
7
4.4k
『三匹の子ぶた』から学ぶネットワークセキュリティの昔と今 / Network Security: Then and Now Through the Lens of The Three Little Pigs
nttcom
1
1.8k
ガバメント AI 源内を地方自治体は活用できるのか可能性と課題、期待について
takeda_h
1
370
Data Hubグループ 紹介資料
sansan33
PRO
0
3.1k
MIRU 2026 チュートリアル
keisuke198619
0
870
【5分でわかる】セーフィー エンジニア向け会社紹介
safie_recruit
0
53k
修正PRを食べてレビュースキルが賢くなる:Claude Codeによる自己改善サイクル
yuyaumetsu
6
1.4k
え?フロントエンドエンジニアの ワイがインフラも!?
puku0x
1
440
モダンフロントエンド 開発研修
recruitengineers
PRO
4
560
モバイルアプリ開発概論2026
recruitengineers
PRO
4
500
認知負荷をGemini で溶かす — GKE 基盤「Orbit」における AI エージェントの実践
sansantech
PRO
1
270
Featured
See All Featured
Bash Introduction
62gerente
615
220k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
420
エンジニアに許された特別な時間の終わり
watany
108
250k
GitHub's CSS Performance
jonrohan
1033
470k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
360
The Pragmatic Product Professional
lauravandoore
37
7.4k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
430
Making Projects Easy
brettharned
120
6.7k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
440
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
330
Raft: Consensus for Rubyists
vanstee
141
7.6k
Transcript
ACT II - ACCEPTANCE TESTING In which our hero ventures
into uncharted territory
TO MOCK OR NOT TO MOCK? To mock!! Drugs are
BAAD! Using the real server is slow & an added dependency is even more BAAAAD
IC-AJAX Very simple interface! Supports returning server errors! Ships with
the ember-app-kit (EAK) and the future-proof ember-cli
ALTERNATIVES ember-testing-httpRespond! Ships with EAK! sinon.js! great for mocking out
timers
FIXTURES Rosie! Rolling your own! DS.FixtureAdapter
ROSIE https://github.com/bkeepers/rosie
DS.FIXTUREADAPTER Can’t test server error responses! Depends on ember-data! Mostly
useful for development
TEST HELPERS
ASYNC HELPERS FROM EMBER-TESTING visit! click! fillIn! keyEvent! triggerEvent! andThen
BUT WAIT! All these (async) helpers return wait(), a promise
that waits for all async operations to finish
SYNC HELPERS FROM EMBER-TESTING find(cssSelector)! currentPath! currentRouteName! currentURL
EXAMPLE I testing for content
CODE EXAMPLE FOR A TEST testing location
EXAMPLES sync and async
RUN’EM! via qunit in the browser! via testem from the
command line! EAK has both these already set up
EXAMPLE qunit in the browser
EXAMPLE testem from the cmdline