Advertisement
Guest User

Untitled

a guest
Apr 28th, 2015
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. require(['text!templates/foo'], function (data) {
  2. // handle loaded data
  3. });
  4.  
  5. it('should load a template', function (done) {
  6.  
  7. // TODO: mock 'text!templates/foo' here to return 'mock_data'
  8.  
  9. // templateViewer uses the text plugin internally to do the actual loading
  10. templateViewer.templateFor('foo', function (error, templateData) {
  11. expect(templateData).toEqual('mock_data');
  12. done();
  13. });
  14.  
  15. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement