mirror of
https://github.com/hanzoai/azure-sdk-for-js.git
synced 2026-10-30 19:51:51 +00:00
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.
25 lines
760 B
PowerShell
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
|
|
}
|
|
}
|