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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Balint Erdi
May 08, 2014
Technology
530
1
Share
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.4k
Why you should consider Ember.js for your next project
balint
4
330
Data Loading Patterns in Ember
balint
1
230
Auth* in Ember apps with Torii
balint
1
320
(Somewhat) Complex Component Design – Ember.BP, 2015/02/11
balint
1
100
Complex Component Design in Ember
balint
0
400
Don't call me back - How Ember uses promises and how you can, too
balint
5
11k
Unit testing in Ember.js
balint
0
110
Introduction to ember-data
balint
0
180
Other Decks in Technology
See All in Technology
実践ハーネスエンジニアリング:TAKTで実現するAIエージェント制御 / Practical Harness Engineering: AI Agent Control Enabled by TAKT
nrslib
11
4.6k
Contract One Engineering Unit 紹介資料
sansan33
PRO
0
16k
Standards et agents IA : un tour d’horizon de MCP, A2A, ADK et plus encore
glaforge
0
170
国内外の生成AIセキュリティの最新動向 & AIガードレール製品「chakoshi」のご紹介 / Latest Trends in Generative AI Security (Domestic & International) & Introduction to AI Guardrail Product "chakoshi"
nttcom
3
1k
AI와 협업하는 조직으로의 여정
arawn
0
450
明日からドヤれる!超マニアックなAWSセキュリティTips10連発 / 10 Ultra-Niche AWS Security Tips
yuj1osm
0
590
Pure Intonation on Browser: Building a Sequencer with Ruby
nagachika
0
120
[OpsJAWS 40]リリースしたら終わり、じゃなかった。セキュリティ空白期間をAWS Security Agentで埋める
sh_fk2
3
240
LLM時代の検索アーキテクチャと技術的意思決定
shibuiwilliam
3
1.2k
クラウドネイティブな開発 ~ 認知負荷に立ち向かうためのコンテナ活用
literalice
0
130
ハーネスエンジニアリングをやりすぎた話 ~そのハーネスは解体された~
gotalab555
4
1.7k
Data Hubグループ 紹介資料
sansan33
PRO
0
2.9k
Featured
See All Featured
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.2k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
260
We Have a Design System, Now What?
morganepeng
55
8.1k
Raft: Consensus for Rubyists
vanstee
141
7.4k
Bash Introduction
62gerente
615
210k
ラッコキーワード サービス紹介資料
rakko
1
3.1M
The Curious Case for Waylosing
cassininazir
0
300
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.6k
SEO for Brand Visibility & Recognition
aleyda
0
4.5k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
110
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
760
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
520
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