raptor-dust
Advanced tools
Comparing version 1.1.3 to 1.1.4
@@ -38,3 +38,3 @@ { | ||
"main": "lib/raptor-dust.js", | ||
"version": "1.1.3" | ||
"version": "1.1.4" | ||
} |
@@ -23,2 +23,11 @@ 'use strict'; | ||
raptorDust.registerHelper('async-test', function(input, out) { | ||
var asyncOut = out.beginAsync(); | ||
setTimeout(function () { | ||
asyncOut.write('Hello Async'); | ||
asyncOut.end(); | ||
}, 1000); | ||
}); | ||
describe('raptor-dust' , function() { | ||
@@ -47,2 +56,14 @@ | ||
it('should allow a simple async tag to be rendered', function(done) { | ||
dust.render(require.resolve('./pages/async-test.dust'), {}, function(err, output) { | ||
if (err) { | ||
return done(err); | ||
} | ||
expect(output).to.equal('Hello Async'); | ||
done(); | ||
}); | ||
}); | ||
}); |
20315
17
167