Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Add iframe coverage support #194

Merged
merged 6 commits into from
Jun 16, 2020
Merged

[FEATURE] Add iframe coverage support #194

merged 6 commits into from
Jun 16, 2020

Conversation

matz3
Copy link
Member

@matz3 matz3 commented Jun 8, 2020

Enable iframe coverage reporting.
Add helper option to modify the karma config such that coverage is enabled in iframes.

the config gets enriched with

"coverageReporter": {
	"instrumenterOptions": {
		"istanbul": {
			"coverageGlobalScope":
				"(function() { var g=window;while(!g.__karma__&&g!==g.parent){g=g.parent;}; return g; })();"
		}
	}
}

when calling in file karma.conf.js

require("karma-ui5/helper").configureIframeCoverage(config);

after configuration has been set.

config.set({
	// ..
});

Can only be used in combination with the karma-coverage plugin.

Fixes: #138

matz3 and others added 2 commits June 8, 2020 12:58
set karma version back to a stable version
with regards to the exitCode
@CLAassistant
Copy link

CLAassistant commented Jun 8, 2020

CLA assistant check
All committers have signed the CLA.

Put karma config into separate file such that it can be
required within the karma config, to simplify setting the
coverageReporter configuration.
@tobiasso85 tobiasso85 changed the title iframe coverage [FEATURE] Enable iframe coverage Jun 10, 2020
@tobiasso85 tobiasso85 marked this pull request as ready for review June 10, 2020 12:55
@matz3 matz3 changed the title [FEATURE] Enable iframe coverage [FEATURE] Add iframe coverage support Jun 16, 2020
@matz3 matz3 merged commit 3b5e67b into master Jun 16, 2020
@matz3
Copy link
Member Author

matz3 commented Jun 16, 2020

This fixes #138

@matz3 matz3 deleted the iframe-coverage branch June 16, 2020 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Coverage Reporting from OPA5#iStartMyAppInAFrame()
3 participants