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.

53 lines
1.5 KiB

  1. var grunt = require('grunt');
  2. var fs = require('fs');
  3. exports.less = {
  4. compile: function(test) {
  5. 'use strict';
  6. test.expect(2);
  7. var actual = grunt.file.read('tmp/less.css');
  8. var expected = grunt.file.read('test/expected/less.css');
  9. test.equal(expected, actual, 'should compile less, with the ability to handle imported files from alternate include paths');
  10. actual = grunt.file.read('tmp/concat.css');
  11. expected = grunt.file.read('test/expected/concat.css');
  12. test.equal(expected, actual, 'should concat output when passed an array');
  13. test.done();
  14. },
  15. compress: function(test) {
  16. 'use strict';
  17. test.expect(1);
  18. var actual = grunt.file.read('tmp/compress.css');
  19. var expected = grunt.file.read('test/expected/compress.css');
  20. test.equal(expected, actual, 'should compress output when compress option is true');
  21. test.done();
  22. },
  23. nopaths: function(test) {
  24. 'use strict';
  25. test.expect(1);
  26. var actual = grunt.file.read('tmp/nopaths.css');
  27. var expected = grunt.file.read('test/expected/nopaths.css');
  28. test.equal(expected, actual, 'should default paths to the dirname of the less file');
  29. test.done();
  30. },
  31. yuicompress: function(test) {
  32. 'use strict';
  33. test.expect(1);
  34. var actual = grunt.file.read('tmp/yuicompress.css');
  35. var expected = grunt.file.read('test/expected/yuicompress.css');
  36. test.equal(expected, actual, 'should yuicompress output when yuicompress option is true');
  37. test.done();
  38. }
  39. };