You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
680 B
21 lines
680 B
var grunt = require('../../lib/grunt');
|
|
|
|
// In case the grunt being used to test is different than the grunt being
|
|
// tested, initialize the task and config subsystems.
|
|
if (grunt.task.searchDirs.length === 0) {
|
|
grunt.task.init([]);
|
|
grunt.config.init({});
|
|
}
|
|
|
|
exports['concat'] = function(test) {
|
|
test.expect(1);
|
|
grunt.registerHelper('test_helper', function(a, b) { return a + b; });
|
|
var files = [
|
|
'test/fixtures/a.js',
|
|
'<test_helper:x:y>',
|
|
'test/fixtures/b.js'
|
|
];
|
|
var lf = grunt.utils.linefeed;
|
|
test.equal(grunt.helper('concat', files), 'var a = 1;\n' + lf + 'xy' + lf + 'var b = 2;\n', 'It should concatenate files and directives.');
|
|
test.done();
|
|
};
|