1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-28 09:49:40 +02:00

chore(project): add prettier for code format (#3645)

* chore(project): install prettier and lint-staged

* chore(project): apply prettier to html too

* chore(project): git ignore eslintcache

* chore(project): add a comment about format script

* chore(prettier): update printWidth

* chore(prettier): remove useTabs option

* chore(prettier): add HTML validation

* refactor(prettier): fix closing tags

* feat(prettier): define angular parser for html templates

* style(prettier): run prettier on codebase

Co-authored-by: Anthony Lapenna <lapenna.anthony@gmail.com>
This commit is contained in:
Chaim Lev-Ari 2020-04-11 00:54:53 +03:00 committed by GitHub
parent 6663073be1
commit cf5056d9c0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
714 changed files with 31228 additions and 28305 deletions

View file

@ -1,31 +1,31 @@
describe("StatsController", function () {
var $scope, $httpBackend, $routeParams;
describe('StatsController', function () {
var $scope, $httpBackend, $routeParams;
beforeEach(angular.mock.module('portainer'));
beforeEach(angular.mock.module('portainer'));
beforeEach(inject(function (_$rootScope_, _$httpBackend_, $controller, _$routeParams_) {
$scope = _$rootScope_.$new();
$httpBackend = _$httpBackend_;
$routeParams = _$routeParams_;
$routeParams.id = 'b17882378cee8ec0136f482681b764cca430befd52a9bfd1bde031f49b8bba9f';
$controller('StatsController', {
'$scope': $scope,
'$routeParams': $routeParams
});
}));
beforeEach(inject(function (_$rootScope_, _$httpBackend_, $controller, _$routeParams_) {
$scope = _$rootScope_.$new();
$httpBackend = _$httpBackend_;
$routeParams = _$routeParams_;
$routeParams.id = 'b17882378cee8ec0136f482681b764cca430befd52a9bfd1bde031f49b8bba9f';
$controller('StatsController', {
$scope: $scope,
$routeParams: $routeParams,
});
}));
//it("should test controller initialize", function () {
// $httpBackend.expectGET('dockerapi/containers/b17882378cee8ec0136f482681b764cca430befd52a9bfd1bde031f49b8bba9f/stats?stream=false').respond(200);
// //expect($scope.ps_args).toBeDefined();
// $httpBackend.flush();
//});
//
//it("a correct top request to the Docker remote API", function () {
// //$httpBackend.expectGET('dockerapi/containers/' + $routeParams.id + '/top?ps_args=').respond(200);
// //$routeParams.id = '123456789123456789123456789';
// //$scope.ps_args = 'aux';
// //$httpBackend.expectGET('dockerapi/containers/' + $routeParams.id + '/top?ps_args=' + $scope.ps_args).respond(200);
// //$scope.getTop();
// //$httpBackend.flush();
//});
});
//it("should test controller initialize", function () {
// $httpBackend.expectGET('dockerapi/containers/b17882378cee8ec0136f482681b764cca430befd52a9bfd1bde031f49b8bba9f/stats?stream=false').respond(200);
// //expect($scope.ps_args).toBeDefined();
// $httpBackend.flush();
//});
//
//it("a correct top request to the Docker remote API", function () {
// //$httpBackend.expectGET('dockerapi/containers/' + $routeParams.id + '/top?ps_args=').respond(200);
// //$routeParams.id = '123456789123456789123456789';
// //$scope.ps_args = 'aux';
// //$httpBackend.expectGET('dockerapi/containers/' + $routeParams.id + '/top?ps_args=' + $scope.ps_args).respond(200);
// //$scope.getTop();
// //$httpBackend.flush();
//});
});