tests: increase test coverage for extensions.test.ts

This commit is contained in:
Aneesh Relan 2021-10-08 20:28:41 +05:30
parent 5e33fdb0d9
commit 705c2a5785

View File

@ -5,6 +5,7 @@ describe('Extension tests', () => {
extension | version | output extension | version | output
${'none'} | ${'7.4'} | ${'Disable-AllShared'} ${'none'} | ${'7.4'} | ${'Disable-AllShared'}
${'Xdebug'} | ${'7.4'} | ${'Add-Extension xdebug'} ${'Xdebug'} | ${'7.4'} | ${'Add-Extension xdebug'}
${'sqlite'} | ${'7.4'} | ${'Add-Extension sqlite3'}
${':intl'} | ${'7.4'} | ${'Disable-Extension intl'} ${':intl'} | ${'7.4'} | ${'Disable-Extension intl'}
${'phalcon4'} | ${'7.4'} | ${'Add-Phalcon phalcon4'} ${'phalcon4'} | ${'7.4'} | ${'Add-Phalcon phalcon4'}
${'pecl_http'} | ${'7.4'} | ${'Add-Http'} ${'pecl_http'} | ${'7.4'} | ${'Add-Http'}
@ -39,6 +40,7 @@ describe('Extension tests', () => {
extension | version | output extension | version | output
${'none'} | ${'7.4'} | ${'disable_all_shared'} ${'none'} | ${'7.4'} | ${'disable_all_shared'}
${'Xdebug'} | ${'7.4'} | ${'add_extension xdebug'} ${'Xdebug'} | ${'7.4'} | ${'add_extension xdebug'}
${'sqlite'} | ${'7.4'} | ${'add_extension sqlite3'}
${':intl'} | ${'7.4'} | ${'disable_extension intl'} ${':intl'} | ${'7.4'} | ${'disable_extension intl'}
${'ast-beta'} | ${'7.4'} | ${'add_unstable_extension ast beta extension'} ${'ast-beta'} | ${'7.4'} | ${'add_unstable_extension ast beta extension'}
${'pdo_mysql'} | ${'7.4'} | ${'add_pdo_extension mysql'} ${'pdo_mysql'} | ${'7.4'} | ${'add_pdo_extension mysql'}
@ -108,4 +110,16 @@ describe('Extension tests', () => {
).toContain(output); ).toContain(output);
} }
); );
it.each`
extension | version | output
${'xdebug'} | ${'7.2'} | ${'Platform openbsd is not supported'}
`(
'checking addExtension on openbsd for extension $extension on version $version',
async ({extension, version, output}) => {
expect(
await extensions.addExtension(extension, version, 'openbsd')
).toContain(output);
}
);
}); });