From d613c975f65c59266898470c8d5e5a6a66687a92 Mon Sep 17 00:00:00 2001 From: Shivam Mathur Date: Sun, 26 Jan 2020 16:15:39 +0530 Subject: [PATCH] Fix lowercasing of coverage driver --- __tests__/coverage.test.ts | 2 +- dist/index.js | 2 +- src/coverage.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/__tests__/coverage.test.ts b/__tests__/coverage.test.ts index b8eaf597..ad9a9bb6 100644 --- a/__tests__/coverage.test.ts +++ b/__tests__/coverage.test.ts @@ -8,7 +8,7 @@ jest.mock('../src/extensions', () => ({ describe('Config tests', () => { it('checking addCoverage with PCOV on windows', async () => { - let win32: string = await coverage.addCoverage('pcov', '7.4', 'win32'); + let win32: string = await coverage.addCoverage('PCOV', '7.4', 'win32'); expect(win32).toContain('add_extension pcov'); expect(win32).toContain('Remove-Extension xdebug'); diff --git a/dist/index.js b/dist/index.js index 373e7d57..9201fa3c 100644 --- a/dist/index.js +++ b/dist/index.js @@ -2151,7 +2151,7 @@ exports.disableCoverage = disableCoverage; */ function addCoverage(coverage_driver, version, os_version) { return __awaiter(this, void 0, void 0, function* () { - coverage_driver.toLowerCase(); + coverage_driver = coverage_driver.toLowerCase(); const script = '\n' + (yield utils.stepLog('Setup Coverage', os_version)); const pipe = yield utils.suppressOutput(os_version); switch (coverage_driver) { diff --git a/src/coverage.ts b/src/coverage.ts index 7b2996a3..74bc5ab8 100644 --- a/src/coverage.ts +++ b/src/coverage.ts @@ -143,7 +143,7 @@ export async function addCoverage( version: string, os_version: string ): Promise { - coverage_driver.toLowerCase(); + coverage_driver = coverage_driver.toLowerCase(); const script: string = '\n' + (await utils.stepLog('Setup Coverage', os_version)); const pipe: string = await utils.suppressOutput(os_version);