diff --git a/spec/artifacts/non.default.extension.hbs b/spec/artifacts/non.default.extension.hbs new file mode 100644 index 000000000..9c3af95fc --- /dev/null +++ b/spec/artifacts/non.default.extension.hbs @@ -0,0 +1 @@ +
This is a test
\ No newline at end of file diff --git a/spec/expected/non.default.extension.amd.js b/spec/expected/non.default.extension.amd.js new file mode 100644 index 000000000..264499a7c --- /dev/null +++ b/spec/expected/non.default.extension.amd.js @@ -0,0 +1,6 @@ +define(['handlebars.runtime'], function(Handlebars) { + Handlebars = Handlebars["default"]; var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {}; + return templates['non.default.extension'] = template({"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data) { + return "
This is a test
"; + },"useData":true}); + }); \ No newline at end of file diff --git a/spec/precompiler.js b/spec/precompiler.js index e560dc6ff..db3c6ba78 100644 --- a/spec/precompiler.js +++ b/spec/precompiler.js @@ -307,8 +307,9 @@ describe('precompiler', function() { Precompiler.loadTemplates( { files: [__dirname + '/artifacts'], extension: 'hbs' }, function(err, opts) { - equal(opts.templates.length, 1); + equal(opts.templates.length, 2); equal(opts.templates[0].name, 'example_2'); + done(err); } ); diff --git a/tasks/test-bin.js b/tasks/test-bin.js index 762a544d3..2718425f7 100644 --- a/tasks/test-bin.js +++ b/tasks/test-bin.js @@ -77,9 +77,14 @@ const testCases = [ expectedOutputSpec: './spec/expected/version.txt' }, { - binInputParameters: ['-i', '
Test String
'], + binInputParameters: [ + '-a', + '-e', + 'hbs', + './spec/artifacts/non.default.extension.hbs' + ], outputLocation: 'stdout', - expectedOutputSpec: './spec/expected/compiled.string.txt' + expectedOutputSpec: './spec/expected/non.default.extension.amd.js' } ];