From 49a0bad9629e41db3c44f27229023e625178b607 Mon Sep 17 00:00:00 2001 From: Aneesh Relan Date: Sat, 9 Oct 2021 17:30:06 +0530 Subject: [PATCH 1/4] tests: refactor install.test.ts to use jest.each --- __tests__/install.test.ts | 200 +++++++++++++++++++++----------------- 1 file changed, 111 insertions(+), 89 deletions(-) diff --git a/__tests__/install.test.ts b/__tests__/install.test.ts index 6a6af0da9..f49cecc38 100644 --- a/__tests__/install.test.ts +++ b/__tests__/install.test.ts @@ -69,93 +69,115 @@ function setEnv( } describe('Install', () => { - it('Test install on windows', async () => { - setEnv('7.0', 'win32', '', '', '', ''); - - let script: string = '' + (await install.run()); - expect(script).toContain('initial script'); - expect(script).toContain('pwsh win32.ps1 7.0 ' + __dirname); - - setEnv('7.3', 'win32', '', '', '', ''); - - script = '' + (await install.run()); - expect(script).toContain('initial script'); - expect(script).toContain('pwsh win32.ps1 7.3 ' + __dirname); - - setEnv('7.3', 'win32', 'a, b', 'a=b', 'x', ''); - - script = '' + (await install.run()); - expect(script).toContain('initial script'); - expect(script).toContain('install extensions'); - expect(script).toContain('edit php.ini'); - expect(script).toContain('set coverage driver'); - expect(script).toContain('pwsh win32.ps1 7.3 ' + __dirname); - }); - - it('Test install on linux', async () => { - setEnv('7.3', 'linux', '', '', '', ''); - - let script: string = '' + (await install.run()); - expect(script).toContain('initial script'); - expect(script).toContain('bash linux.sh 7.3 '); - - setEnv('latest', 'linux', '', '', '', ''); - - script = '' + (await install.run()); - expect(script).toContain('initial script'); - expect(script).toContain('bash linux.sh 8.0 '); - - setEnv('7.3', 'linux', 'a, b', 'a=b', 'x', 'phpunit'); - - script = '' + (await install.run()); - expect(script).toContain('initial script'); - expect(script).toContain('install extensions'); - expect(script).toContain('edit php.ini'); - expect(script).toContain('set coverage driver'); - expect(script).toContain('bash linux.sh 7.3'); - expect(script).toContain('add_tool'); - }); - - it('Test install on darwin', async () => { - setEnv('7.3', 'darwin', '', '', '', ''); - - let script: string = '' + (await install.run()); - expect(script).toContain('initial script'); - expect(script).toContain('bash darwin.sh 7.3 ' + __dirname); - - setEnv('7.3', 'darwin', 'a, b', 'a=b', 'x', ''); - - script = '' + (await install.run()); - expect(script).toContain('initial script'); - expect(script).toContain('install extensions'); - expect(script).toContain('edit php.ini'); - expect(script).toContain('set coverage driver'); - expect(script).toContain('bash darwin.sh 7.3 ' + __dirname); - }); - - it('Test malformed version inputs', async () => { - setEnv('7.4.1', 'darwin', '', '', '', ''); - - let script: string = '' + '' + (await install.run()); - expect(script).toContain('initial script'); - expect(script).toContain('bash darwin.sh 7.4 ' + __dirname); - - setEnv(8.0, 'darwin', '', '', '', ''); - - script = '' + (await install.run()); - expect(script).toContain('initial script'); - expect(script).toContain('bash darwin.sh 8.0 ' + __dirname); - - setEnv(8, 'darwin', '', '', '', ''); - - script = '' + (await install.run()); - expect(script).toContain('initial script'); - expect(script).toContain('bash darwin.sh 8.0 ' + __dirname); - - setEnv(8.1, 'darwin', '', '', '', ''); - - script = '' + (await install.run()); - expect(script).toContain('initial script'); - expect(script).toContain('bash darwin.sh 8.1 ' + __dirname); - }); + it.each` + version | extension_csv | ini_values_csv | coverage_driver | tools | output + ${'7.0'} | ${''} | ${''} | ${''} | ${''} | ${new RegExp(`initial script.*pwsh win32.ps1 7.0.*${__dirname}`)} + ${'7.3'} | ${''} | ${''} | ${''} | ${''} | ${new RegExp(`initial script.*pwsh win32.ps1 7.3.*${__dirname}`)} + ${'7.3'} | ${'a, b'} | ${'a=b'} | ${'x'} | ${''} | ${new RegExp(`initial script.*install extensions*set coverage driver.*edit php.ini.*pwsh win32.ps1 7.3.*${__dirname}`)} + `( + 'Test install on windows for $version with extensions=$extension_csv, ini_values=$ini_values_csv, coverage_driver=$coverage_driver, tools=$tools', + async ({ + version, + extension_csv, + ini_values_csv, + coverage_driver, + tools, + output + }) => { + setEnv( + version, + 'win32', + extension_csv, + ini_values_csv, + coverage_driver, + tools + ); + + expect(await install.run()).toMatch(output); + } + ); + + it.each` + version | extension_csv | ini_values_csv | coverage_driver | tools | output + ${'7.3'} | ${''} | ${''} | ${''} | ${''} | ${new RegExp(`initial script.*bash linux.sh 7.3`)} + ${'latest'} | ${''} | ${''} | ${''} | ${''} | ${new RegExp(`initial script.*bash linux.sh 8.0`)} + ${'7.3'} | ${'a, b'} | ${'a=b'} | ${'x'} | ${'phpunit'} | ${new RegExp(`initial script.*add_tool.*install extensions.*set coverage driver.*edit php.ini.*bash linux.sh 7.3`)} + `( + 'Test install on linux for $version with extensions=$extension_csv, ini_values=$ini_values_csv, coverage_driver=$coverage_driver, tools=$tools', + async ({ + version, + extension_csv, + ini_values_csv, + coverage_driver, + tools, + output + }) => { + setEnv( + version, + 'linux', + extension_csv, + ini_values_csv, + coverage_driver, + tools + ); + + expect('' + (await install.run())).toMatch(output); + } + ); + + it.each` + version | extension_csv | ini_values_csv | coverage_driver | tools | output + ${'7.3'} | ${''} | ${''} | ${''} | ${''} | ${new RegExp(`initial script.*bash darwin.sh 7.3 .*${__dirname}`)} + ${'7.3'} | ${'a, b'} | ${'a=b'} | ${'x'} | ${''} | ${new RegExp(`initial script.*install extensions.*set coverage driver.*edit php.ini.*bash darwin.sh 7.3 .*${__dirname}`)} + `( + 'Test install on darwin for $version with extensions=$extension_csv, ini_values=$ini_values_csv, coverage_driver=$coverage_driver, tools=$tools', + async ({ + version, + extension_csv, + ini_values_csv, + coverage_driver, + tools, + output + }) => { + setEnv( + version, + 'darwin', + extension_csv, + ini_values_csv, + coverage_driver, + tools + ); + + expect('' + (await install.run())).toMatch(output); + } + ); + + it.each` + version | extension_csv | ini_values_csv | coverage_driver | tools | output + ${'7.4.1'} | ${''} | ${''} | ${''} | ${''} | ${new RegExp(`initial script.*bash darwin.sh 7.4 .*${__dirname}`)} + ${'8.0'} | ${''} | ${''} | ${''} | ${''} | ${new RegExp(`initial script.*bash darwin.sh 8.0 .*${__dirname}`)} + ${'8'} | ${''} | ${''} | ${''} | ${''} | ${new RegExp(`initial script.*bash darwin.sh 8.0 .*${__dirname}`)} + ${'8.1'} | ${''} | ${''} | ${''} | ${''} | ${new RegExp(`initial script.*bash darwin.sh 8.1 .*${__dirname}`)} + `( + 'Test malformed version inputs for $version with extensions=$extension_csv, ini_values=$ini_values_csv, coverage_driver=$coverage_driver, tools=$tools', + async ({ + version, + extension_csv, + ini_values_csv, + coverage_driver, + tools, + output + }) => { + setEnv( + version, + 'darwin', + extension_csv, + ini_values_csv, + coverage_driver, + tools + ); + + expect('' + (await install.run())).toMatch(output); + } + ); }); From 4e864eae3b74bb077db47a19c92367d8baa049aa Mon Sep 17 00:00:00 2001 From: Aneesh Relan Date: Sat, 9 Oct 2021 18:44:47 +0530 Subject: [PATCH 2/4] tests: move os to a parameter --- __tests__/install.test.ts | 108 ++++++-------------------------------- 1 file changed, 17 insertions(+), 91 deletions(-) diff --git a/__tests__/install.test.ts b/__tests__/install.test.ts index f49cecc38..2b852147f 100644 --- a/__tests__/install.test.ts +++ b/__tests__/install.test.ts @@ -16,7 +16,7 @@ jest.mock('../src/install', () => ({ const extension_csv: string = process.env['extensions'] || ''; const ini_values_csv: string = process.env['ini-values'] || ''; const coverage_driver: string = process.env['coverage'] || ''; - let tools_csv: string = process.env['tools'] || ''; + const tools_csv: string = process.env['tools'] || ''; let script = 'initial script ' + filename + version + os_version; script += tools_csv ? 'add_tool' : ''; script += extension_csv ? 'install extensions' : ''; @@ -70,14 +70,24 @@ function setEnv( describe('Install', () => { it.each` - version | extension_csv | ini_values_csv | coverage_driver | tools | output - ${'7.0'} | ${''} | ${''} | ${''} | ${''} | ${new RegExp(`initial script.*pwsh win32.ps1 7.0.*${__dirname}`)} - ${'7.3'} | ${''} | ${''} | ${''} | ${''} | ${new RegExp(`initial script.*pwsh win32.ps1 7.3.*${__dirname}`)} - ${'7.3'} | ${'a, b'} | ${'a=b'} | ${'x'} | ${''} | ${new RegExp(`initial script.*install extensions*set coverage driver.*edit php.ini.*pwsh win32.ps1 7.3.*${__dirname}`)} + version | os | extension_csv | ini_values_csv | coverage_driver | tools | output + ${'7.3'} | ${'darwin'} | ${''} | ${''} | ${''} | ${''} | ${new RegExp(`initial script.*bash darwin.sh 7.3 .*${__dirname}`)} + ${'7.3'} | ${'darwin'} | ${'a, b'} | ${'a=b'} | ${'x'} | ${''} | ${new RegExp(`initial script.*install extensions.*set coverage driver.*edit php.ini.*bash darwin.sh 7.3 .*${__dirname}`)} + ${'7.4.1'} | ${'darwin'} | ${''} | ${''} | ${''} | ${''} | ${new RegExp(`initial script.*bash darwin.sh 7.4 .*${__dirname}`)} + ${'8'} | ${'darwin'} | ${''} | ${''} | ${''} | ${''} | ${new RegExp(`initial script.*bash darwin.sh 8.0 .*${__dirname}`)} + ${'8.0'} | ${'darwin'} | ${''} | ${''} | ${''} | ${''} | ${new RegExp(`initial script.*bash darwin.sh 8.0 .*${__dirname}`)} + ${'8.1'} | ${'darwin'} | ${''} | ${''} | ${''} | ${''} | ${new RegExp(`initial script.*bash darwin.sh 8.1 .*${__dirname}`)} + ${'7.3'} | ${'linux'} | ${''} | ${''} | ${''} | ${''} | ${new RegExp(`initial script.*bash linux.sh 7.3`)} + ${'7.3'} | ${'linux'} | ${'a, b'} | ${'a=b'} | ${'x'} | ${'phpunit'} | ${new RegExp(`initial script.*add_tool.*install extensions.*set coverage driver.*edit php.ini.*bash linux.sh 7.3`)} + ${'latest'} | ${'linux'} | ${''} | ${''} | ${''} | ${''} | ${new RegExp(`initial script.*bash linux.sh 8.0`)} + ${'7.0'} | ${'win32'} | ${''} | ${''} | ${''} | ${''} | ${new RegExp(`initial script.*pwsh win32.ps1 7.0.*${__dirname}`)} + ${'7.3'} | ${'win32'} | ${''} | ${''} | ${''} | ${''} | ${new RegExp(`initial script.*pwsh win32.ps1 7.3.*${__dirname}`)} + ${'7.3'} | ${'win32'} | ${'a, b'} | ${'a=b'} | ${'x'} | ${''} | ${new RegExp(`initial script.*install extensions*set coverage driver.*edit php.ini.*pwsh win32.ps1 7.3.*${__dirname}`)} `( - 'Test install on windows for $version with extensions=$extension_csv, ini_values=$ini_values_csv, coverage_driver=$coverage_driver, tools=$tools', + 'Test install on $os for $version with extensions=$extension_csv, ini_values=$ini_values_csv, coverage_driver=$coverage_driver, tools=$tools', async ({ version, + os, extension_csv, ini_values_csv, coverage_driver, @@ -86,7 +96,7 @@ describe('Install', () => { }) => { setEnv( version, - 'win32', + os, extension_csv, ini_values_csv, coverage_driver, @@ -96,88 +106,4 @@ describe('Install', () => { expect(await install.run()).toMatch(output); } ); - - it.each` - version | extension_csv | ini_values_csv | coverage_driver | tools | output - ${'7.3'} | ${''} | ${''} | ${''} | ${''} | ${new RegExp(`initial script.*bash linux.sh 7.3`)} - ${'latest'} | ${''} | ${''} | ${''} | ${''} | ${new RegExp(`initial script.*bash linux.sh 8.0`)} - ${'7.3'} | ${'a, b'} | ${'a=b'} | ${'x'} | ${'phpunit'} | ${new RegExp(`initial script.*add_tool.*install extensions.*set coverage driver.*edit php.ini.*bash linux.sh 7.3`)} - `( - 'Test install on linux for $version with extensions=$extension_csv, ini_values=$ini_values_csv, coverage_driver=$coverage_driver, tools=$tools', - async ({ - version, - extension_csv, - ini_values_csv, - coverage_driver, - tools, - output - }) => { - setEnv( - version, - 'linux', - extension_csv, - ini_values_csv, - coverage_driver, - tools - ); - - expect('' + (await install.run())).toMatch(output); - } - ); - - it.each` - version | extension_csv | ini_values_csv | coverage_driver | tools | output - ${'7.3'} | ${''} | ${''} | ${''} | ${''} | ${new RegExp(`initial script.*bash darwin.sh 7.3 .*${__dirname}`)} - ${'7.3'} | ${'a, b'} | ${'a=b'} | ${'x'} | ${''} | ${new RegExp(`initial script.*install extensions.*set coverage driver.*edit php.ini.*bash darwin.sh 7.3 .*${__dirname}`)} - `( - 'Test install on darwin for $version with extensions=$extension_csv, ini_values=$ini_values_csv, coverage_driver=$coverage_driver, tools=$tools', - async ({ - version, - extension_csv, - ini_values_csv, - coverage_driver, - tools, - output - }) => { - setEnv( - version, - 'darwin', - extension_csv, - ini_values_csv, - coverage_driver, - tools - ); - - expect('' + (await install.run())).toMatch(output); - } - ); - - it.each` - version | extension_csv | ini_values_csv | coverage_driver | tools | output - ${'7.4.1'} | ${''} | ${''} | ${''} | ${''} | ${new RegExp(`initial script.*bash darwin.sh 7.4 .*${__dirname}`)} - ${'8.0'} | ${''} | ${''} | ${''} | ${''} | ${new RegExp(`initial script.*bash darwin.sh 8.0 .*${__dirname}`)} - ${'8'} | ${''} | ${''} | ${''} | ${''} | ${new RegExp(`initial script.*bash darwin.sh 8.0 .*${__dirname}`)} - ${'8.1'} | ${''} | ${''} | ${''} | ${''} | ${new RegExp(`initial script.*bash darwin.sh 8.1 .*${__dirname}`)} - `( - 'Test malformed version inputs for $version with extensions=$extension_csv, ini_values=$ini_values_csv, coverage_driver=$coverage_driver, tools=$tools', - async ({ - version, - extension_csv, - ini_values_csv, - coverage_driver, - tools, - output - }) => { - setEnv( - version, - 'darwin', - extension_csv, - ini_values_csv, - coverage_driver, - tools - ); - - expect('' + (await install.run())).toMatch(output); - } - ); }); From eca40cad4dbba54c21ae200368c5eba179c3ca12 Mon Sep 17 00:00:00 2001 From: Aneesh Relan Date: Sat, 9 Oct 2021 18:59:50 +0530 Subject: [PATCH 3/4] tests: resolve windows path matching --- __tests__/install.test.ts | 56 +++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 32 deletions(-) diff --git a/__tests__/install.test.ts b/__tests__/install.test.ts index 2b852147f..099fbcb06 100644 --- a/__tests__/install.test.ts +++ b/__tests__/install.test.ts @@ -5,26 +5,18 @@ import * as utils from '../src/utils'; * Mock install.ts */ jest.mock('../src/install', () => ({ - getScript: jest - .fn() - .mockImplementation( - async ( - filename: string, - version: string, - os_version: string - ): Promise => { - const extension_csv: string = process.env['extensions'] || ''; - const ini_values_csv: string = process.env['ini-values'] || ''; - const coverage_driver: string = process.env['coverage'] || ''; - const tools_csv: string = process.env['tools'] || ''; - let script = 'initial script ' + filename + version + os_version; - script += tools_csv ? 'add_tool' : ''; - script += extension_csv ? 'install extensions' : ''; - script += coverage_driver ? 'set coverage driver' : ''; - script += ini_values_csv ? 'edit php.ini' : ''; - return script; - } - ), + getScript: jest.fn().mockImplementation(async (): Promise => { + const extension_csv: string = process.env['extensions'] || ''; + const ini_values_csv: string = process.env['ini-values'] || ''; + const coverage_driver: string = process.env['coverage'] || ''; + const tools_csv: string = process.env['tools'] || ''; + let script = 'initial script'; + script += tools_csv ? ' add_tool' : ''; + script += extension_csv ? ' install extensions' : ''; + script += coverage_driver ? ' set coverage driver' : ''; + script += ini_values_csv ? ' edit php.ini' : ''; + return script; + }), run: jest.fn().mockImplementation(async (): Promise => { const os_version: string = process.env['RUNNER_OS'] || ''; const version: string = await utils.parseVersion( @@ -71,18 +63,18 @@ function setEnv( describe('Install', () => { it.each` version | os | extension_csv | ini_values_csv | coverage_driver | tools | output - ${'7.3'} | ${'darwin'} | ${''} | ${''} | ${''} | ${''} | ${new RegExp(`initial script.*bash darwin.sh 7.3 .*${__dirname}`)} - ${'7.3'} | ${'darwin'} | ${'a, b'} | ${'a=b'} | ${'x'} | ${''} | ${new RegExp(`initial script.*install extensions.*set coverage driver.*edit php.ini.*bash darwin.sh 7.3 .*${__dirname}`)} - ${'7.4.1'} | ${'darwin'} | ${''} | ${''} | ${''} | ${''} | ${new RegExp(`initial script.*bash darwin.sh 7.4 .*${__dirname}`)} - ${'8'} | ${'darwin'} | ${''} | ${''} | ${''} | ${''} | ${new RegExp(`initial script.*bash darwin.sh 8.0 .*${__dirname}`)} - ${'8.0'} | ${'darwin'} | ${''} | ${''} | ${''} | ${''} | ${new RegExp(`initial script.*bash darwin.sh 8.0 .*${__dirname}`)} - ${'8.1'} | ${'darwin'} | ${''} | ${''} | ${''} | ${''} | ${new RegExp(`initial script.*bash darwin.sh 8.1 .*${__dirname}`)} - ${'7.3'} | ${'linux'} | ${''} | ${''} | ${''} | ${''} | ${new RegExp(`initial script.*bash linux.sh 7.3`)} - ${'7.3'} | ${'linux'} | ${'a, b'} | ${'a=b'} | ${'x'} | ${'phpunit'} | ${new RegExp(`initial script.*add_tool.*install extensions.*set coverage driver.*edit php.ini.*bash linux.sh 7.3`)} - ${'latest'} | ${'linux'} | ${''} | ${''} | ${''} | ${''} | ${new RegExp(`initial script.*bash linux.sh 8.0`)} - ${'7.0'} | ${'win32'} | ${''} | ${''} | ${''} | ${''} | ${new RegExp(`initial script.*pwsh win32.ps1 7.0.*${__dirname}`)} - ${'7.3'} | ${'win32'} | ${''} | ${''} | ${''} | ${''} | ${new RegExp(`initial script.*pwsh win32.ps1 7.3.*${__dirname}`)} - ${'7.3'} | ${'win32'} | ${'a, b'} | ${'a=b'} | ${'x'} | ${''} | ${new RegExp(`initial script.*install extensions*set coverage driver.*edit php.ini.*pwsh win32.ps1 7.3.*${__dirname}`)} + ${'7.3'} | ${'darwin'} | ${''} | ${''} | ${''} | ${''} | ${'initial script bash darwin.sh 7.3 ' + __dirname} + ${'7.3'} | ${'darwin'} | ${'a, b'} | ${'a=b'} | ${'x'} | ${''} | ${'initial script install extensions set coverage driver edit php.ini bash darwin.sh 7.3 ' + __dirname} + ${'7.4.1'} | ${'darwin'} | ${''} | ${''} | ${''} | ${''} | ${'initial script bash darwin.sh 7.4 ' + __dirname} + ${'8'} | ${'darwin'} | ${''} | ${''} | ${''} | ${''} | ${'initial script bash darwin.sh 8.0 ' + __dirname} + ${'8.0'} | ${'darwin'} | ${''} | ${''} | ${''} | ${''} | ${'initial script bash darwin.sh 8.0 ' + __dirname} + ${'8.1'} | ${'darwin'} | ${''} | ${''} | ${''} | ${''} | ${'initial script bash darwin.sh 8.1 ' + __dirname} + ${'7.3'} | ${'linux'} | ${''} | ${''} | ${''} | ${''} | ${'initial script bash linux.sh 7.3'} + ${'7.3'} | ${'linux'} | ${'a, b'} | ${'a=b'} | ${'x'} | ${'phpunit'} | ${'initial script add_tool install extensions set coverage driver edit php.ini bash linux.sh 7.3'} + ${'latest'} | ${'linux'} | ${''} | ${''} | ${''} | ${''} | ${'initial script bash linux.sh 8.0'} + ${'7.0'} | ${'win32'} | ${''} | ${''} | ${''} | ${''} | ${'initial script pwsh win32.ps1 7.0 ' + __dirname} + ${'7.3'} | ${'win32'} | ${''} | ${''} | ${''} | ${''} | ${'initial script pwsh win32.ps1 7.3 ' + __dirname} + ${'7.3'} | ${'win32'} | ${'a, b'} | ${'a=b'} | ${'x'} | ${''} | ${'initial script install extensions set coverage driver edit php.ini pwsh win32.ps1 7.3 ' + __dirname} `( 'Test install on $os for $version with extensions=$extension_csv, ini_values=$ini_values_csv, coverage_driver=$coverage_driver, tools=$tools', async ({ From 96e47f9be70c3f4a3ebf7635e18442264beeacf8 Mon Sep 17 00:00:00 2001 From: Aneesh Relan Date: Sat, 9 Oct 2021 19:01:59 +0530 Subject: [PATCH 4/4] tests: have a strict assertion using toBe --- __tests__/install.test.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/__tests__/install.test.ts b/__tests__/install.test.ts index 099fbcb06..e2d3fd246 100644 --- a/__tests__/install.test.ts +++ b/__tests__/install.test.ts @@ -69,9 +69,9 @@ describe('Install', () => { ${'8'} | ${'darwin'} | ${''} | ${''} | ${''} | ${''} | ${'initial script bash darwin.sh 8.0 ' + __dirname} ${'8.0'} | ${'darwin'} | ${''} | ${''} | ${''} | ${''} | ${'initial script bash darwin.sh 8.0 ' + __dirname} ${'8.1'} | ${'darwin'} | ${''} | ${''} | ${''} | ${''} | ${'initial script bash darwin.sh 8.1 ' + __dirname} - ${'7.3'} | ${'linux'} | ${''} | ${''} | ${''} | ${''} | ${'initial script bash linux.sh 7.3'} - ${'7.3'} | ${'linux'} | ${'a, b'} | ${'a=b'} | ${'x'} | ${'phpunit'} | ${'initial script add_tool install extensions set coverage driver edit php.ini bash linux.sh 7.3'} - ${'latest'} | ${'linux'} | ${''} | ${''} | ${''} | ${''} | ${'initial script bash linux.sh 8.0'} + ${'7.3'} | ${'linux'} | ${''} | ${''} | ${''} | ${''} | ${'initial script bash linux.sh 7.3 ' + __dirname} + ${'7.3'} | ${'linux'} | ${'a, b'} | ${'a=b'} | ${'x'} | ${'phpunit'} | ${'initial script add_tool install extensions set coverage driver edit php.ini bash linux.sh 7.3 ' + __dirname} + ${'latest'} | ${'linux'} | ${''} | ${''} | ${''} | ${''} | ${'initial script bash linux.sh 8.0 ' + __dirname} ${'7.0'} | ${'win32'} | ${''} | ${''} | ${''} | ${''} | ${'initial script pwsh win32.ps1 7.0 ' + __dirname} ${'7.3'} | ${'win32'} | ${''} | ${''} | ${''} | ${''} | ${'initial script pwsh win32.ps1 7.3 ' + __dirname} ${'7.3'} | ${'win32'} | ${'a, b'} | ${'a=b'} | ${'x'} | ${''} | ${'initial script install extensions set coverage driver edit php.ini pwsh win32.ps1 7.3 ' + __dirname} @@ -95,7 +95,7 @@ describe('Install', () => { tools ); - expect(await install.run()).toMatch(output); + expect(await install.run()).toBe(output); } ); });