diff --git a/package.json b/package.json index fee9f46..a756830 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "dependencies": { "gulp-util": "^3.0.3", "through2": "^0.6.3", - "handlebars": ">=3.0.0" + "handlebars": ">=4.0.5" }, "devDependencies": { "mocha": "*" diff --git a/test/test.js b/test/test.js index 0742586..e6e640b 100644 --- a/test/test.js +++ b/test/test.js @@ -148,3 +148,18 @@ it('should not require a default data object', function (cb) { stream.end(); }); + +it('should support failover partial blocks when no partial is provided', function (cb) { + var stream = template({}, {}); + + stream.on('data', function (data) { + assert.equal(data.contents.toString(), 'Failover content'); + cb(); + }); + + stream.write(new gutil.File({ + contents: new Buffer('{{#> myPartial }}Failover content{{/myPartial}}') + })); + + stream.end(); +});