gulp-copy.spec.js 877 B

123456789101112131415161718192021222324252627282930313233343536
  1. 'use strict';
  2. describe('Gulp Copy', function() {
  3. var gulpCopy = require('../../lib/gulp-copy');
  4. it('should exist', function() {
  5. expect(gulpCopy).toBeDefined();
  6. });
  7. it('should require a valid destination', function() {
  8. expect(function() {
  9. gulpCopy();
  10. }).toThrow();
  11. expect(function() {
  12. gulpCopy(null);
  13. }).toThrow();
  14. expect(function() {
  15. gulpCopy(1);
  16. }).toThrow();
  17. expect(function() {
  18. gulpCopy('');
  19. }).not.toThrow();
  20. });
  21. it('should require a valid options object', function() {
  22. expect(function() {
  23. gulpCopy('', 1);
  24. }).toThrow();
  25. expect(function() {
  26. gulpCopy('');
  27. }).not.toThrow();
  28. expect(function() {
  29. gulpCopy('', {});
  30. }).not.toThrow();
  31. });
  32. });