« index
Coverage for /Users/jdemorai/projects/dust-Linkedin/dustjs/test/jasmine-test/spec/renderTestSpec.js : 100%
21 lines |
21 run |
0 missing |
0 partial |
7 blocks |
7 blocks run |
0 blocks missing
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | describe ("Test the basic functionality of dust", function() { for (var index = 0; index < dustExamples.length; index++) { var test = dustExamples[index]; it (test.message, render(test)); }; }); function render(test) { return function() { try { dust.loadSource(dust.compile(test.source, test.name)); dust.render(test.name, test.context, function(err, output) { expect(err).toBeNull(); expect(test.expected).toEqual(output); }); } catch (error) { expect(test.error || {} ).toEqual(error.message); } }; } |