Advertisement
Guest User

Untitled

a guest
Jul 24th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.66 KB | None | 0 0
  1. //Service Spec code :
  2.  
  3. define([], function () {
  4. 'use strict';
  5. describe('search Service spec', function () {
  6. var searchService;
  7.  
  8. beforeEach(angular.module('flightRouteApp', []));
  9.  
  10. describe('service methods', function () {
  11.  
  12. it('should calculate the length of the element', inject(function (searchService) {
  13. expect(searchService).toBeDefined();
  14. }));
  15. });
  16. });
  17.  
  18. // Karma configuration
  19. // Generated on Sun Mar 05 2017 09:17:46 GMT+0100 (W. Europe Standard Time)
  20. /* global module */
  21. "use strict";
  22.  
  23. module.exports = function (config) {
  24. config.set({
  25.  
  26. // base path that will be used to resolve all patterns (eg. files, exclude)
  27. basePath: '',
  28.  
  29.  
  30. // frameworks to use
  31. // available frameworks: https://npmjs.org/browse/keyword/karma-adapter
  32. frameworks: ['jasmine','requirejs'],
  33.  
  34. // list of files / patterns to load in the browser
  35. files: [
  36. {pattern:'node_modules/angular/angular.js',watched: true, included: true, served: true},
  37. {pattern:'node_modules/angular-mocks/angular-mocks.js',watched: true, included: true, served: true},
  38. {pattern:'app/js/flightRoute.js',watched: true, included: true, served: true},
  39. {pattern:'app/js/services/*.js',watched: true, included: true, served: true},
  40. {pattern:'app/js/**/*.js',watched: true, included: true, served: true},
  41. {pattern:'tests/test-main.js',watched: true, included: true, served: true},
  42. {pattern: 'tests/**/*.Spec.js',watched: true, included: true, served: true}
  43.  
  44. ],
  45.  
  46. // list of files to exclude
  47. exclude: [ ],
  48.  
  49.  
  50. // test results reporter to use
  51. // possible values: 'dots', 'progress'
  52. // available reporters: https://npmjs.org/browse/keyword/karma-reporter
  53. /*reporters: ['progress','coverage'],*/
  54. reporters: config.angularCli && config.angularCli.codeCoverage
  55. ? ['progress', 'coverage-istanbul']
  56. : ['progress', 'kjhtml'],
  57. preprocessors: {
  58. 'app/js/**/*.js': 'coverage'
  59. },
  60.  
  61.  
  62. // web server port
  63. port: 9876,
  64. coverageReporter: {includeAllSources: true, reporters:[{type: 'html', dir:'coverage/'}]},
  65.  
  66. // enable / disable colors in the output (reporters and logs)
  67. colors: true,
  68. //vel of logging
  69. // possible values: config.LOG_DISABLE || config.LOG_ERROR ||
  70. config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
  71. logLevel: config.LOG_INFO,
  72.  
  73.  
  74. // enable / disable watching file and executing tests whenever any file changes
  75. autoWatch: false,
  76.  
  77.  
  78.  
  79. // start these browsers
  80. // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
  81. browsers: ['Chrome'],
  82.  
  83.  
  84. // Continuous Integration mode
  85. // if true, Karma captures browsers, runs the tests and exits
  86. singleRun: false,
  87.  
  88. // Concurrency level
  89. // how many browser should be started simultaneous
  90. concurrency: Infinity
  91. })
  92. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement