Skip to content

Commit 535db5f

Browse files
Elena Rodionovaignatvilesov
authored andcommitted
API 2.1 - PBIVIZ 3.x.x
1 parent fcbb848 commit 535db5f

24 files changed

Lines changed: 9825 additions & 9405 deletions

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ typings
66
.api
77
*.log
88
/coverage
9+
webpack.statistics.html

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
".tmp": true
99
},
1010
"files.exclude": {
11-
".tmp": true,
11+
".tmp": false,
1212
"coverage": true
1313
},
1414
"search.exclude": {

CHANGELOG.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
## 1.6.0
1+
## 2.0.0
22
* API 2.1.0
3-
* * Fixed Edge SVG issue
3+
* Webpack integration
4+
* Fixed Edge SVG issue
45

56
## 1.5.1
67
* Fixed wrong chart's scale yAxis rendering

karma.conf.js

Lines changed: 0 additions & 95 deletions
This file was deleted.

karma.conf.ts

Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
/*
2+
* Power BI Visualizations
3+
*
4+
* Copyright (c) Microsoft Corporation
5+
* All rights reserved.
6+
* MIT License
7+
*
8+
* Permission is hereby granted, free of charge, to any person obtaining a copy
9+
* of this software and associated documentation files (the ""Software""), to deal
10+
* in the Software without restriction, including without limitation the rights
11+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12+
* copies of the Software, and to permit persons to whom the Software is
13+
* furnished to do so, subject to the following conditions:
14+
*
15+
* The above copyright notice and this permission notice shall be included in
16+
* all copies or substantial portions of the Software.
17+
*
18+
* THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24+
* THE SOFTWARE.
25+
*/
26+
27+
"use strict";
28+
29+
const webpackConfig = require("./test.webpack.config.js");
30+
const tsconfig = require("./test.tsconfig.json");
31+
const path = require("path");
32+
33+
const testRecursivePath = "test/visualTest.ts";
34+
const srcOriginalRecursivePath = "src/**/*.ts";
35+
const srcRecursivePath = ".tmp/drop/**/*.js";
36+
const coverageFolder = "coverage";
37+
const globals = "./test/globals.ts";
38+
39+
process.env.CHROME_BIN = require("puppeteer").executablePath();
40+
41+
import { Config, ConfigOptions } from "karma";
42+
43+
module.exports = (config: Config) => {
44+
config.set(<ConfigOptions>{
45+
browserNoActivityTimeout: 100000,
46+
browsers: ["ChromeHeadless"],
47+
colors: true,
48+
frameworks: ["jasmine"],
49+
reporters: [
50+
"progress",
51+
"coverage",
52+
"coverage-istanbul"
53+
],
54+
singleRun: true,
55+
plugins: [
56+
"karma-coverage",
57+
"karma-typescript",
58+
"karma-webpack",
59+
"karma-jasmine",
60+
"karma-sourcemap-loader",
61+
"karma-chrome-launcher",
62+
"karma-coverage-istanbul-reporter"
63+
],
64+
files: [
65+
"node_modules/jquery/dist/jquery.min.js",
66+
"node_modules/jasmine-jquery/lib/jasmine-jquery.js",
67+
globals,
68+
srcRecursivePath,
69+
testRecursivePath,
70+
{
71+
pattern: srcOriginalRecursivePath,
72+
included: false,
73+
served: true
74+
},
75+
{
76+
pattern: "./capabilities.json",
77+
watched: false,
78+
served: true,
79+
included: false
80+
}
81+
],
82+
preprocessors: {
83+
[testRecursivePath]: ["webpack"],
84+
[srcRecursivePath]: ["sourcemap"]
85+
},
86+
typescriptPreprocessor: {
87+
options: tsconfig.compilerOptions
88+
},
89+
coverageIstanbulReporter: {
90+
// reports can be any that are listed here: https://github.com/istanbuljs/istanbuljs/tree/aae256fb8b9a3d19414dcf069c592e88712c32c6/packages/istanbul-reports/lib
91+
reports: {
92+
lcovonly: coverageFolder + "lcov.info",
93+
html: coverageFolder,
94+
"text-summary": null
95+
},
96+
97+
// base output directory. If you include %browser% in the path it will be replaced with the karma browser name
98+
dir: path.join(__dirname, "coverage"),
99+
100+
// Combines coverage information from multiple browsers into one report rather than outputting a report
101+
// for each browser.
102+
combineBrowserReports: true,
103+
104+
// if using webpack and pre-loaders, work around webpack breaking the source path
105+
fixWebpackSourcePaths: true,
106+
107+
// Omit files with no statements, no functions and no branches from the report
108+
skipFilesWithNoCoverage: true,
109+
110+
// Most reporters accept additional config options. You can pass these through the `report-config` option
111+
"report-config": {
112+
// all options available at: https://github.com/istanbuljs/istanbuljs/blob/aae256fb8b9a3d19414dcf069c592e88712c32c6/packages/istanbul-reports/lib/html/index.js#L135-L137
113+
html: {
114+
// outputs the report in ./coverage/html
115+
subdir: "html"
116+
}
117+
}
118+
},
119+
coverageReporter: {
120+
dir: coverageFolder,
121+
reporters: [
122+
{ type: "html" },
123+
{ type: "lcov" }
124+
]
125+
},
126+
mime: {
127+
"text/x-typescript": ["ts", "tsx"]
128+
},
129+
webpack: webpackConfig,
130+
webpackMiddleware: {
131+
stats: "errors-only"
132+
}
133+
});
134+
};

0 commit comments

Comments
 (0)