diff --git a/__tests__/coverage.test.ts b/__tests__/coverage.test.ts index cc158312..455f6ed1 100644 --- a/__tests__/coverage.test.ts +++ b/__tests__/coverage.test.ts @@ -47,6 +47,12 @@ describe('Config tests', () => { 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 () => { const darwin: string = await coverage.addCoverage( 'xdebug', diff --git a/dist/index.js b/dist/index.js index aa7ea308..1ffe2e6f 100644 --- a/dist/index.js +++ b/dist/index.js @@ -2163,7 +2163,7 @@ async function addCoverageXdebug(extension, version, os_version, pipe) { return '\n' + xdebug + '\n' + ini + '\n' + log; case /^xdebug$/.test(extension): default: - return '\n' + xdebug + '\n' + log; + return xdebug + '\n' + log; } } exports.addCoverageXdebug = addCoverageXdebug; diff --git a/src/coverage.ts b/src/coverage.ts index 19dccfcb..182c280e 100644 --- a/src/coverage.ts +++ b/src/coverage.ts @@ -34,7 +34,7 @@ export async function addCoverageXdebug( return '\n' + xdebug + '\n' + ini + '\n' + log; case /^xdebug$/.test(extension): default: - return '\n' + xdebug + '\n' + log; + return xdebug + '\n' + log; } }