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
270
Data Loading Patterns in Ember
balint
1
190
Auth* in Ember apps with Torii
balint
1
290
(Somewhat) Complex Component Design – Ember.BP, 2015/02/11
balint
1
89
Complex Component Design in Ember
balint
0
370
Don't call me back - How Ember uses promises and how you can, too
balint
5
10k
Unit testing in Ember.js
balint
0
70
Introduction to ember-data
balint
0
150
Other Decks in Technology
See All in Technology
30代エンジニアが考える、エンジニア生存戦略~~セキュリティを添えて~~
masakiokuda
4
1.9k
KCD Brazil '25: Enabling Developers with Dapr & Backstage
salaboy
1
110
移行できそうでやりきれなかった 10年超えのシステムを葬るための戦略 / phper-kaigi-2025-ryu
carta_engineering
0
670
コミュニティとおかねの話 / Community and Money
kgsi
0
100
17年のQA経験が導いたスクラムマスターへの道 / 17 Years in QA to Scrum Master
toma_sm
0
160
Dapr For Java Developers SouJava 25
salaboy
1
120
ClineにNext.jsのプロジェクト改善をお願いしてみた / 20250321_reacttokyo_LT
optim
1
1.1k
PHPStan をできる限り高速化してみる
colopl
0
240
Alpine.js を活用した Laravel MPA フロントエンド最適化戦略 / Alpine.js MPA
tzmfreedom
1
600
BCMathを高速化した一部始終をC言語でガチ目に解説する / BCMath performance improvement explanation
sakitakamachi
2
600
RubyKaigi で得た課題解決法・美意識・モチベーション
morihirok
0
310
EMの仕事、あるいは顧客価値創出のアーキテクト
radiocat
0
120
Featured
See All Featured
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Automating Front-end Workflow
addyosmani
1369
200k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
60k
How to Think Like a Performance Engineer
csswizardry
22
1.4k
It's Worth the Effort
3n
184
28k
Git: the NoSQL Database
bkeepers
PRO
429
65k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
11
600
The MySQL Ecosystem @ GitHub 2015
samlambert
251
12k
A Philosophy of Restraint
colly
203
16k
Writing Fast Ruby
sferik
628
61k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
32
2.2k
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