Skip to content

Commit

Permalink
add failing test to demonstrate #1436
Browse files Browse the repository at this point in the history
  • Loading branch information
linoleum-js committed Jun 19, 2016
1 parent 29c506c commit 662bd69
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/grunt/config_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ exports.config = {
bar: 'bar',
arr: ['foo', '<%= obj.foo2 %>'],
arr2: ['<%= arr %>', '<%= obj.Arr %>'],
arr3: ['<%= meta %>'],
buffer: new Buffer('test'),
});
done();
Expand Down Expand Up @@ -61,7 +62,7 @@ exports.config = {
test.done();
},
'config.get': function(test) {
test.expect(10);
test.expect(13);
test.equal(grunt.config.get('foo'), 'bar', 'Should process templates.');
test.equal(grunt.config.get('foo2'), 'bar', 'Should process templates recursively.');
test.equal(grunt.config.get('obj.foo2'), 'bar', 'Should process deeply nested templates recursively.');
Expand All @@ -73,6 +74,9 @@ exports.config = {
var buf = grunt.config.get('buffer');
test.ok(Buffer.isBuffer(buf), 'Should retrieve Buffer instances as Buffer.');
test.deepEqual(buf, new Buffer('test'), 'Should return buffers as-is.');
test.deepEqual(grunt.config.get('arr3.0'), {foo: 'bar', baz: [1, 2, 3]});
test.deepEqual(grunt.config.get('arr3.0').foo, 'bar');
test.deepEqual(grunt.config.get('arr3.0.foo'), 'bar');
test.done();
},
'config.set': function(test) {
Expand Down

0 comments on commit 662bd69

Please sign in to comment.