Files
Daniel JurekandGitHub 9faa6c61dd Docs onboarding v2 (#26682)
Requires eng/common changes in
https://github.com/Azure/azure-sdk-tools/pull/6632.
Note: There's also a cleanup
[PR](https://github.com/Azure/azure-sdk-tools/issues/6800) to cleanup
older language specific items.

Test run of
docindex:https://dev.azure.com/azure-sdk/internal/_build/results?buildId=2970911&view=logs&j=dc056dfc-c0cf-5958-c8c4-8da4f91a3739

Converts a collection of metadata JSON files into an onboarding spec.
2023-08-23 14:56:55 -07:00

25 lines
760 B
PowerShell

Import-Module Pester
BeforeAll {
. $PSScriptRoot/../Docs-Onboarding.ps1
}
Describe 'GetPackageInfoFromDocsMsConfig' {
It 'Returns expected values' -ForEach @(
@{ inputValue = '@azure/[email protected]'; expectedValue = @{ Name = '@azure/package'; Version = '1.2.3' } },
@{ inputValue = '@azure/package'; expectedValue = @{ Name = '@azure/package'; Version = '' } }
) {
$result = GetPackageInfoFromDocsMsConfig $inputValue
$result.Name | Should -Be $expectedValue.Name
$result.Version | Should -Be $expectedValue.Version
}
It 'Throws when given $null' {
{ GetPackageInfoFromDocsMsConfig $null } | Should -Throw
}
It 'Throws when given an empty string' {
{ GetPackageInfoFromDocsMsConfig '' } | Should -Throw
}
}