reporter: 'html', globals:['XMLHttpRequest','jQuery*'] }); $().ready(function() { // Is the div to attach view DOM tests using `view.appendTo('#fixture')`. // Remember to view.destroy(). $('<div id="fixture" style="display:none;"><div>').appendTo('body'); }); // Define some utility methods to make tests more concise window.testLookup = function(identifier) { 'use strict'; return App.__container__.lookup(identifier); }; Thursday, July 25, 13
from a template', function() { var plan = App.ReportPlan.createFromTemplate(template); expect(App.ReportPlan.detectInstance(plan)).to.be.ok; plan.get('title').should.equal('ACH Activity Report'); }); Thursday, July 25, 13
number less than 1000', function() { testView('{{formatNumber view.value}}', 999).should.equal('999'); }); it('should add commas to numbers greater than 1000', function() { testView('{{formatNumber view.value}}', 1000).should.equal('1,000'); }); Thursday, July 25, 13