Join Justin Yost for an in-depth discussion in this video Helper tests, part of Ember.js Essential Training.
- [Instructor] So, helper tests, guess what?…They follow the pattern of unit tests,…which we've already seen with the model.…We set up the data, called the helper function itself,…and see what happens and verify…that we get our correct result.…Again, we'll first start the Ember test server,…as when we generate helpers,…we get the resulting test module automatically built.…So, in your terminal application,…you'll want to enter the command, ember test --server.…At this point, we now need to switch over to our browser…and we can switch to the Module…for our tests for our helpers.…
If we scroll down, we'll see that there's…a Unit | Helper | bookmark title test.…We can now switch over to our code editor…and open up the module for our bookmark title helper test.…This is at tests,…unit,…helpers,…bookmark-title-test.js.…Notice here, all we do is call the helper function,…passing in our values, and asserting our result is correct.…To do this, we'll simply update line eight,…where we call our bookmarkTitle helper,…and we'll pass in the string, canary,…
- Why choose Ember?
- Installing Ember.js and Ember Inspector
- Defining the model
- Creating nested and dynamic routes
- Loading templates with routes
- Rendering different templates
- Displaying collections
- Working with Ember components
- Building forms
- Creating, editing, and deleting records
- Configuring Ember.js applications
- Testing your Ember application
- Installing add-ins
- Upgrading an Ember application
Skill Level Intermediate
1. Ember.js Basics
2. Getting Started with Ember.js
3. Our First Ember.js Application
4. Ember.js Routes
5. Ember.js Models
6. Ember.js Templates
7. Ember.js Components
9. Application Configuration
Build an app for production3m 29s
11. The Ember.js Community
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.