Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require(['text!templates/foo'], function (data) {
- // handle loaded data
- });
- it('should load a template', function (done) {
- // TODO: mock 'text!templates/foo' here to return 'mock_data'
- // templateViewer uses the text plugin internally to do the actual loading
- templateViewer.templateFor('foo', function (error, templateData) {
- expect(templateData).toEqual('mock_data');
- done();
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement