CTAN.tests.ps1

describe CTAN {
    it 'Is the Comprehensive TeX Archive Network' {
        $ctanPackages1 = Get-CTAN
        $ctanPackages2 = ctan
        $ctanPackages3 = ctan.org
        
        $ctanPackages1.Count -eq $ctanPackages2.Count -eq $ctanPackages3.Count |
            Should -Be $true
            
        $ctanPackages1.Count | 
            Should -BeGreaterThan 0
    }

    it 'Can can -ListAuthor' {
        ctan.org -ListAuthor -First 1 | 
            Select-Object -ExpandProperty key | 
            Should -Not -BeNullOrEmpty
    }

    it 'Can can -ListTopic' {
        ctan.org -ListTopic -First 1 | 
            Select-Object -ExpandProperty key | 
            Should -Not -BeNullOrEmpty
    }

    it 'Can can -ListLicense' {
        ctan.org -ListLicense -First 1 | 
            Select-Object -ExpandProperty key | 
            Should -Not -BeNullOrEmpty
    }
}