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.

39 lines
1.1 KiB

  1. 'use strict';
  2. var grunt = require('grunt');
  3. exports.cssmin = {
  4. main: function(test) {
  5. test.expect(1);
  6. var expect = grunt.file.read('test/expected/style.css');
  7. var result = grunt.file.read('tmp/style.css');
  8. test.equal(expect, result, 'should concat and minify an array of css files in order using clean-css');
  9. test.done();
  10. },
  11. with_banner: function(test) {
  12. test.expect(1);
  13. var expect = grunt.file.read('test/expected/with-banner.css');
  14. var result = grunt.file.read('tmp/with-banner.css');
  15. test.equal(expect, result, 'should concat, minify and prefix banner');
  16. test.done();
  17. },
  18. empty: function(test) {
  19. test.expect(1);
  20. test.ok(!grunt.file.exists('tmp/idontexist.css'), 'Empty minified file should not exist');
  21. test.done();
  22. },
  23. remove_first_comment: function(test) {
  24. test.expect(1);
  25. var expect = grunt.file.read('test/expected/input_bannered.css');
  26. var result = grunt.file.read('tmp/remove_first_comment.css');
  27. test.equal(expect, result, 'should minify and replace banner');
  28. test.done();
  29. }
  30. };