all files / packages/website/mocks/ mockPackage.js

100% Statements 8/8
100% Branches 0/0
87.5% Functions 7/8
100% Lines 8/8
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46                                                                            
var Package = require('dgeni').Package;
 
module.exports = function mockPackage() {
 
  return new Package('mockPackage', [require('../')])
 
  // provide a mock log service
  .factory('log', function() { return require('dgeni/lib/mocks/log')(false); })
 
  // provide a mock template engine for the tests
  .factory('templateEngine', function dummyTemplateEngine() {})
 
  // provide a mock template finder for the tests
  .factory('templateFinder', function dummyTemplateFinder() {
    return {
      templateFolders: [],
      templatePatterns: []
    }
  })
 
  // provide a mock path compiting processor for the tests
  .factory('computePathsProcessor', function dummyComputePathsProcessor() {
    return {
      pathTemplates: []
    }
  })
 
  // provide mock markdown renderer for the tests
  .factory('renderMarkdown', function dummyRenderMarkdown() {
  })
 
 
  // provide a mock tags processor for the tests
  .factory('parseTagsProcessor', function dummyParseTagsProcessor() {
    return  {
      tagDefinitions: []
    }
  })
 
  // provide a mock navigation processor for the tests
  .factory('aliasMap', function dummyAliasMap() {
    return {
    }
  })
};