Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ engines:
- php
eslint:
enabled: true
exclude_fingerprints:
- 74cd3d3cf3dab02564766a2a0522b601
checks:
no-undef:
enabled: false
Expand Down
17 changes: 17 additions & 0 deletions app/components/activity-chart/component.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
describe('activityChart', function() {

// Load the module that contains the `activityChart` component before each test
beforeEach(module('gitdashApp'));

// Test the controller
describe('ActivityChartController', function() {

it('should check length of activities', inject(function($componentController) {
var $scope = {};
var ctrl = $componentController('activityChart', {$scope: $scope});
expect($scope.data.length).toBe(17);
}));

});

});
17 changes: 17 additions & 0 deletions app/components/activity-graph/component.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
describe('activityGraph', function() {

// Load the module that contains the `activityChart` component before each test
beforeEach(module('gitdashApp'));

// Test the controller
describe('ActivityGraphController', function() {

it('should check length of activities', inject(function($componentController) {
var $scope = {};
var ctrl = $componentController('activityGraph', {$scope: $scope});
expect($scope.data.length).toBe(3);
}));

});

});
17 changes: 17 additions & 0 deletions app/components/language-chart/component.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
describe('languageChart', function() {

// Load the module that contains the `languageChart` component before each test
beforeEach(module('gitdashApp'));

// Test the controller
describe('LanguageChartController', function() {

it('should check length of languages', inject(function($componentController) {
var $scope = {};
var ctrl = $componentController('languageChart', {$scope: $scope});
expect($scope.data.length).toBe(12);
}));

});

});
15 changes: 15 additions & 0 deletions app/components/profile-chart/component.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
describe('profileChart', function() {

// Load the module that contains the `profileChart` component before each test
beforeEach(module('gitdashApp'));

// Test the controller
describe('ProfileChartController', function() {

it('should check if profile loaded or not', inject(function($componentController) {
var $scope = {};
var ctrl = $componentController('profileChart', {$scope: $scope});
expect($scope.userData).toBeDefined();
}));
});
});
19 changes: 19 additions & 0 deletions app/components/pullrequest-list/component.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
describe('pullrequestList', function() {

// Load the module that contains the `pullrequestList` component before each test
beforeEach(module('gitdashApp'));

// Test the controller
describe('PullrequestListController', function() {

it('should load pullrequestevents', inject(function($componentController) {
var $scope = {};
var ctrl = $componentController('pullrequestList', {$scope: $scope});
expect($scope.openPullRequests).toBeDefined();
expect($scope.closedPullRequests).toBeDefined();

}));

});

});
17 changes: 17 additions & 0 deletions app/components/pushevent-list/component.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
describe('pusheventList', function() {

// Load the module that contains the `pusheventList` component before each test
beforeEach(module('gitdashApp'));

// Test the controller
describe('PusheventListController', function() {

it('should load pushevent', inject(function($componentController) {
var $scope = {};
var ctrl = $componentController('pusheventList', {$scope: $scope});
expect($scope.pushEvents).toBeDefined();
}));

});

});
17 changes: 17 additions & 0 deletions app/components/repo-list/component.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
describe('repoList', function() {

// Load the module that contains the `repoList` component before each test
beforeEach(module('gitdashApp'));

// Test the controller
describe('RepoListController', function() {

it('should load repos', inject(function($componentController) {
var $scope = {};
var ctrl = $componentController('repoList', {$scope: $scope});
expect($scope.reposLoaded).toBeDefined();
}));

});

});
77 changes: 77 additions & 0 deletions karma.conf.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
// Karma configuration
// Generated on Sat Aug 27 2016 13:38:29 GMT+0530 (IST)

module.exports = function(config) {
config.set({

// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '',


// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
frameworks: ['jasmine'],


// list of files / patterns to load in the browser
files: [
'node_modules/angular/angular.js',
'node_modules/angular-route/angular-route.min.js',
'node_modules/angular-mocks/angular-mocks.js',
'node_modules/d3/d3.js',
'node_modules/nvd3/build/nv.d3.js',
'node_modules/angular-nvd3/dist/angular-nvd3.js',
'app/app-config/app.js',
'dist/js/script.js',
'app/components/**/component.spec.js'
],


// list of files to exclude
exclude: [
],


// preprocess matching files before serving them to the browser
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
preprocessors: {
},


// test results reporter to use
// possible values: 'dots', 'progress'
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
reporters: ['progress'],


// web server port
port: 9876,


// enable / disable colors in the output (reporters and logs)
colors: true,


// level of logging
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
logLevel: config.LOG_INFO,


// enable / disable watching file and executing tests whenever any file changes
autoWatch: true,


// start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
browsers: ['Chrome'],


// Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits
singleRun: false,

// Concurrency level
// how many browser should be started simultaneous
concurrency: Infinity
})
}
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,11 @@
"gulp-sass": "^2.3.2",
"gulp-uglify": "^2.0.0",
"gulp-util": "^3.0.7",
"jasmine-core": "^2.4.1",
"jshint": "^2.9.3",
"karma": "^1.2.0",
"karma-chrome-launcher": "^2.0.0",
"karma-jasmine": "^1.0.2",
"merge-stream": "^1.0.0",
"node-sass": "^3.8.0",
"nodemon": "^1.10.2"
Expand Down