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
1
520
Acceptance testing in Ember.js
Balint Erdi
May 08, 2014
Tweet
Share
More Decks by Balint Erdi
See All by Balint Erdi
Data Loading Patterns with JSON API
balint
5
1.3k
Why you should consider Ember.js for your next project
balint
4
250
Data Loading Patterns in Ember
balint
1
180
Auth* in Ember apps with Torii
balint
1
290
(Somewhat) Complex Component Design – Ember.BP, 2015/02/11
balint
1
87
Complex Component Design in Ember
balint
0
360
Don't call me back - How Ember uses promises and how you can, too
balint
5
10k
Unit testing in Ember.js
balint
0
67
Introduction to ember-data
balint
0
150
Other Decks in Technology
See All in Technology
生成AIをより賢く エンジニアのための RAG入門 - Oracle AI Jam Session #20
kutsushitaneko
4
300
React Routerで実現する型安全なSPAルーティング
sansantech
PRO
2
300
ネットワーク可視化の世界
likr
1
2.1k
MasterMemory v3 最速確認会
yucchiy
0
140
マイクロサービスにおける容易なトランザクション管理に向けて
scalar
0
190
DUSt3R, MASt3R, MASt3R-SfM にみる3D基盤モデル
spatial_ai_network
2
300
C++26 エラー性動作
faithandbrave
2
830
サイボウズフロントエンドエキスパートチームについて / FrontendExpert Team
cybozuinsideout
PRO
5
38k
GitHub Copilot のテクニック集/GitHub Copilot Techniques
rayuron
39
17k
プロダクト組織で取り組むアドベントカレンダー/Advent Calendar in Product Teams
mixplace
0
280
サイバー攻撃を想定したセキュリティガイドライン 策定とASM及びCNAPPの活用方法
syoshie
3
1.5k
AWS re:Invent 2024で発表された コードを書く開発者向け機能について
maruto
0
220
Featured
See All Featured
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
330
21k
Art, The Web, and Tiny UX
lynnandtonic
298
20k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
365
25k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
How To Stay Up To Date on Web Technology
chriscoyier
789
250k
Designing on Purpose - Digital PM Summit 2013
jponch
116
7k
Building an army of robots
kneath
302
44k
Large-scale JavaScript Application Architecture
addyosmani
510
110k
Documentation Writing (for coders)
carmenintech
67
4.5k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
169
50k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
44
9.3k
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