Fix Xdebug coverage

This commit is contained in:
Shivam Mathur 2020-06-19 14:47:34 +05:30
parent e0ed1ad0ef
commit c5e40d9067
No known key found for this signature in database
GPG Key ID: 3E13E4C8591ACC2A
3 changed files with 8 additions and 2 deletions

View File

@ -47,6 +47,12 @@ describe('Config tests', () => {
expect(linux).toContain('echo "xdebug.mode=coverage"'); expect(linux).toContain('echo "xdebug.mode=coverage"');
}); });
it('checking addCoverage with Xdebug on linux', async () => {
const linux: string = await coverage.addCoverage('xdebug', '8.0', 'linux');
expect(linux).toContain('add_extension xdebug');
expect(linux).toContain('echo "xdebug.mode=coverage"');
});
it('checking addCoverage with Xdebug on darwin', async () => { it('checking addCoverage with Xdebug on darwin', async () => {
const darwin: string = await coverage.addCoverage( const darwin: string = await coverage.addCoverage(
'xdebug', 'xdebug',

2
dist/index.js vendored
View File

@ -2163,7 +2163,7 @@ async function addCoverageXdebug(extension, version, os_version, pipe) {
return '\n' + xdebug + '\n' + ini + '\n' + log; return '\n' + xdebug + '\n' + ini + '\n' + log;
case /^xdebug$/.test(extension): case /^xdebug$/.test(extension):
default: default:
return '\n' + xdebug + '\n' + log; return xdebug + '\n' + log;
} }
} }
exports.addCoverageXdebug = addCoverageXdebug; exports.addCoverageXdebug = addCoverageXdebug;

View File

@ -34,7 +34,7 @@ export async function addCoverageXdebug(
return '\n' + xdebug + '\n' + ini + '\n' + log; return '\n' + xdebug + '\n' + ini + '\n' + log;
case /^xdebug$/.test(extension): case /^xdebug$/.test(extension):
default: default:
return '\n' + xdebug + '\n' + log; return xdebug + '\n' + log;
} }
} }