a zip code crypto-currency system good for red ONLY

preprocess.spec.js 1.2KB

12345678910111213141516171819202122232425262728
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. var path_1 = require("path");
  4. var preprocess = require("./preprocess");
  5. var deeplink = require("./deep-linking");
  6. var helpers = require("./util/helpers");
  7. var globUtil = require("./util/glob-util");
  8. describe('Preprocess Task', function () {
  9. describe('preprocess', function () {
  10. it('should call deepLink but not write files to disk', function () {
  11. // arrange
  12. var context = {
  13. optimizeJs: false
  14. };
  15. var mockDirName = path_1.join('some', 'fake', 'dir');
  16. var mockGlobResults = [];
  17. mockGlobResults.push({ absolutePath: mockDirName });
  18. mockGlobResults.push({ absolutePath: mockDirName + '2' });
  19. spyOn(deeplink, deeplink.deepLinking.name).and.returnValue(Promise.resolve());
  20. spyOn(helpers, helpers.getBooleanPropertyValue.name).and.returnValue(false);
  21. spyOn(helpers, helpers.getStringPropertyValue.name).and.returnValue(mockDirName);
  22. spyOn(globUtil, globUtil.globAll.name).and.returnValue(Promise.resolve(mockGlobResults));
  23. // act
  24. return preprocess.preprocess(context);
  25. });
  26. });
  27. });