Testing against time in JavaScript applications
summary
Concrete patterns for testing time-dependent JavaScript: use ember-test-helpers and QUnit with async/await so visit/render helpers wait until Ember’s internal settle checks finish; replace real HTTP by owner.register mock service that returns resolved promises instead of network calls; assert UI after click only after the returned promise settles; freeze or travel dates with a time library (e.g. timecop) to avoid weekday-sensitive flakiness. Examples include Ember data model loading, simulated fetch responses, and avoiding fixed timeouts.
AI-written summary · about
chapters (6)
- 0:00Start
- 0:20Testing against time in JavaScript Applications
- 3:18Testing in Ember Apps 101
- 5:40Making Tests Wait Async Ops
- 13:55Writing your own waiting helper
- 20:55Timing in your tests matters
related talks
28mThe Next Generation of Testing
36mLiving with flaky tests
26mAutomated Visual Testing in Ember
28mDeveloping an Ember Test Strategy
01h 02mWriting better tests for your JavaScript app
31mThe Unofficial, Official Ember Testing Guide
16mTest as if you're in someone else's shoes
25mMaking JavaScript Tests Fast, Easy, and Friendly
