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

feat: Add LCOV reporting by default in karma remap instanbul reporter #1657

Merged
Merged
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
3 changes: 2 additions & 1 deletion addon/ng2/blueprints/ng2/files/config/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ module.exports = function (config) {
},
remapIstanbulReporter: {
reports: {
html: 'coverage'
html: 'coverage',
lcovonly: './coverage/coverage.lcov'
}
},
angularCliConfig: './angular-cli.json',
Expand Down
14 changes: 10 additions & 4 deletions tests/e2e/e2e_workflow.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,12 @@ describe('Basic end-to-end Workflow', function () {
expect(existsSync(coverageReport)).to.be.equal(true);
});

it('Make sure that LCOV file is generated inside coverage folder', function() {
const lcovReport = path.join(process.cwd(), 'coverage', 'coverage.lcov');

expect(existsSync(lcovReport)).to.be.equal(true);
});

it('moves all files that live inside `public` into `dist`', function () {
this.timeout(420000);

Expand Down Expand Up @@ -375,8 +381,8 @@ describe('Basic end-to-end Workflow', function () {
let lessFile = path.join(componentPath, lessFilename);
let lessExample = '.outer {\n .inner { background: #fff; }\n }';
let componentContents = fs.readFileSync(componentFile, 'utf8');
sh.mv(cssFile, lessFile);

sh.mv(cssFile, lessFile);
fs.writeFileSync(lessFile, lessExample, 'utf8');
fs.writeFileSync(componentFile, componentContents.replace(new RegExp(cssFilename, 'g'), lessFilename), 'utf8');

Expand All @@ -402,8 +408,8 @@ describe('Basic end-to-end Workflow', function () {
let stylusFile = path.join(componentPath, stylusFilename);
let stylusExample = '.outer {\n .inner { background: #fff; }\n }';
let componentContents = fs.readFileSync(componentFile, 'utf8');
sh.mv(cssFile, stylusFile);

sh.mv(cssFile, stylusFile);
fs.writeFileSync(stylusFile, stylusExample, 'utf8');
fs.writeFileSync(componentFile, componentContents.replace(new RegExp(cssFilename, 'g'), stylusFilename), 'utf8');

Expand Down