Skip to content

Commit ab3ad11

Browse files
Release [1.1.0] - Test coverage & Refactoring (#13)
* Added initial test coverage for svg-container component * Added code coverage script * Simplified logic in setGridPattern fn * Wrote tests for the showGrid and grid changes * Finalized tests for svg container * Updated comments * Added initial tests for testing svg-circle directive * Added test coverage for svg-circle * Added tests and refactored svg-ellipse directive * Updated project structure. Removed unnecesasry files * Updated tests. Updated image directive * Removed unnecessary files * Added svg-line unit tests * Updated and refactored svg-path. Added tests. * Added polygon and polyline tests * Refactored and added tests for svg-rect * Finalized tests for the svg-text * Released 1.1.0
1 parent 78f9c19 commit ab3ad11

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+3667
-1066
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ To add a circle element to the svg-container, you must add the following element
135135
You can provide following parameters for the element
136136

137137
```
138-
radius: Radius of the circle. (MANDATORY)
138+
diameter: Diameter of the circle (twice the radius). (MANDATORY)
139139
color: Background color of the circle. (OPTIONAL, Defaults to '#000')
140140
x: Starting point on x axis. (OPTIONAL, Defaults to 0)
141141
y: Starting point on y axis. (OPTIONAL, Defaults to 0)

angular.json

+2-86
Original file line numberDiff line numberDiff line change
@@ -8,62 +8,6 @@
88
"sourceRoot": "src",
99
"projectType": "application",
1010
"architect": {
11-
"build": {
12-
"builder": "@angular-devkit/build-angular:browser",
13-
"options": {
14-
"outputPath": "dist",
15-
"index": "src/index.html",
16-
"main": "src/main.ts",
17-
"tsConfig": "src/tsconfig.app.json",
18-
"polyfills": "src/polyfills.ts",
19-
"assets": [
20-
"src/assets",
21-
"src/favicon.ico"
22-
],
23-
"styles": [
24-
"src/styles.css"
25-
],
26-
"scripts": [
27-
"node_modules/@svgdotjs/svg.js/dist/svg.min.js"
28-
]
29-
},
30-
"configurations": {
31-
"production": {
32-
"optimization": true,
33-
"outputHashing": "all",
34-
"sourceMap": false,
35-
"extractCss": true,
36-
"namedChunks": false,
37-
"aot": true,
38-
"extractLicenses": true,
39-
"vendorChunk": false,
40-
"buildOptimizer": true,
41-
"fileReplacements": [
42-
{
43-
"replace": "src/environments/environment.ts",
44-
"with": "src/environments/environment.prod.ts"
45-
}
46-
]
47-
}
48-
}
49-
},
50-
"serve": {
51-
"builder": "@angular-devkit/build-angular:dev-server",
52-
"options": {
53-
"browserTarget": "ngx-svg:build"
54-
},
55-
"configurations": {
56-
"production": {
57-
"browserTarget": "ngx-svg:build:production"
58-
}
59-
}
60-
},
61-
"extract-i18n": {
62-
"builder": "@angular-devkit/build-angular:extract-i18n",
63-
"options": {
64-
"browserTarget": "ngx-svg:build"
65-
}
66-
},
6711
"test": {
6812
"builder": "@angular-devkit/build-angular:karma",
6913
"options": {
@@ -74,12 +18,9 @@
7418
"scripts": [
7519
"node_modules/@svgdotjs/svg.js/dist/svg.min.js"
7620
],
77-
"styles": [
78-
"src/styles.css"
79-
],
21+
"styles": [],
8022
"assets": [
81-
"src/assets",
82-
"src/favicon.ico"
23+
"src/assets"
8324
]
8425
}
8526
},
@@ -96,31 +37,6 @@
9637
}
9738
}
9839
}
99-
},
100-
"ngx-svg-e2e": {
101-
"root": "e2e",
102-
"sourceRoot": "e2e",
103-
"projectType": "application",
104-
"architect": {
105-
"e2e": {
106-
"builder": "@angular-devkit/build-angular:protractor",
107-
"options": {
108-
"protractorConfig": "./protractor.conf.js",
109-
"devServerTarget": "ngx-svg:serve"
110-
}
111-
},
112-
"lint": {
113-
"builder": "@angular-devkit/build-angular:tslint",
114-
"options": {
115-
"tsConfig": [
116-
"e2e/tsconfig.e2e.json"
117-
],
118-
"exclude": [
119-
"**/node_modules/**"
120-
]
121-
}
122-
}
123-
}
12440
}
12541
},
12642
"defaultProject": "ngx-svg",

e2e/app.e2e-spec.ts

-13
This file was deleted.

e2e/app.po.ts

-11
This file was deleted.

e2e/tsconfig.e2e.json

-14
This file was deleted.

karma.conf.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,16 @@ module.exports = function (config) {
1616
clearContext: false // leave Jasmine Spec Runner output visible in browser
1717
},
1818
coverageIstanbulReporter: {
19-
dir: require('path').join(__dirname, 'coverage'), reports: [ 'html', 'lcovonly' ],
19+
dir: require('path').join(__dirname, 'coverage'),
20+
reports: [ 'html', 'lcovonly', 'text-summary' ],
2021
fixWebpackSourcePaths: true
2122
},
22-
23-
reporters: ['progress', 'kjhtml'],
23+
reporters: ['progress'],
2424
port: 9876,
2525
colors: true,
2626
logLevel: config.LOG_INFO,
2727
autoWatch: true,
2828
browsers: ['Chrome'],
29-
singleRun: false
29+
singleRun: true
3030
});
3131
};

0 commit comments

Comments
 (0)