Skip to content

Commit

Permalink
tests: increase test coverage for extensions.test.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
aneeshrelan committed Oct 8, 2021
1 parent 5e33fdb commit 705c2a5
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions __tests__/extensions.test.ts
Expand Up @@ -5,6 +5,7 @@ describe('Extension tests', () => {
extension | version | output
${'none'} | ${'7.4'} | ${'Disable-AllShared'}
${'Xdebug'} | ${'7.4'} | ${'Add-Extension xdebug'}
${'sqlite'} | ${'7.4'} | ${'Add-Extension sqlite3'}
${':intl'} | ${'7.4'} | ${'Disable-Extension intl'}
${'phalcon4'} | ${'7.4'} | ${'Add-Phalcon phalcon4'}
${'pecl_http'} | ${'7.4'} | ${'Add-Http'}
Expand Down Expand Up @@ -39,6 +40,7 @@ describe('Extension tests', () => {
extension | version | output
${'none'} | ${'7.4'} | ${'disable_all_shared'}
${'Xdebug'} | ${'7.4'} | ${'add_extension xdebug'}
${'sqlite'} | ${'7.4'} | ${'add_extension sqlite3'}
${':intl'} | ${'7.4'} | ${'disable_extension intl'}
${'ast-beta'} | ${'7.4'} | ${'add_unstable_extension ast beta extension'}
${'pdo_mysql'} | ${'7.4'} | ${'add_pdo_extension mysql'}
Expand Down Expand Up @@ -108,4 +110,16 @@ describe('Extension tests', () => {
).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);
}
);
});

0 comments on commit 705c2a5

Please sign in to comment.