From 7e6a6172e302dacb7baf33219fa1a2b830417486 Mon Sep 17 00:00:00 2001 From: Edward Sun Date: Wed, 5 Feb 2025 12:20:23 -0500 Subject: [PATCH] revert back windows test since there is no docs generator --- scripts/live-test.ps1 | 59 ------------------------------------------- 1 file changed, 59 deletions(-) diff --git a/scripts/live-test.ps1 b/scripts/live-test.ps1 index 9672f8ea6b0..705b0ecc08b 100644 --- a/scripts/live-test.ps1 +++ b/scripts/live-test.ps1 @@ -25,76 +25,17 @@ try { Write-Host "Running Fern Commands!" $DebugPreference = "Continue" - # Initialize Fern project - Write-Host "Initializing Fern project..." & node $cli_path init --organization fern - # Create test docs structure - Write-Host "Creating test docs structure..." - New-Item -ItemType Directory -Path "docs\images" -Force - - # Create a test image - Write-Host "Creating test image..." - "Test Image Content" | Out-File -FilePath "docs\images\test.png" - - # Create test markdown with various Windows path formats - Write-Host "Creating test markdown..." - $testMarkdown = @" -# Test Document - -## Relative Path Tests -![Relative Image](.\images\test.png) -![Parent Path](..\docs\images\test.png) - -## Absolute Path Tests -![Absolute Path](${test_dir}\docs\images\test.png) - -## Mixed Slash Tests -![Mixed Slashes](./images\test.png) -"@ - Set-Content -Path "docs\test.md" -Value $testMarkdown - - Write-Host "Created test markdown with Windows paths:" - Get-Content "docs\test.md" - - # Run normal commands - Write-Host "Adding SDK generators..." & node $cli_path add fern-java-sdk & node $cli_path add fern-python-sdk & node $cli_path add fern-postman - Write-Host "Generating docs..." & node $cli_path generate --log-level debug - # List directory contents for debugging - Write-Host "Directory contents:" - Get-ChildItem -Recurse | Select-Object FullName - - # Verify the generated output - Write-Host "Checking generated docs..." - $docsPath = ".fern\generated-docs" - if (Test-Path $docsPath) { - Write-Host "Found generated docs directory at: $docsPath" - Get-ChildItem $docsPath | ForEach-Object { - Write-Host "Found file: $($_.FullName)" - } - Get-Content "$docsPath\*.md" | Select-String -Pattern "file:" | ForEach-Object { - Write-Host "Found file reference: $_" - } - } else { - Write-Host "Generated docs directory not found at: $docsPath" - Write-Host "Current directory: $(Get-Location)" - Write-Error "Generated docs not found!" - } - $DebugPreference = "SilentlyContinue" & node $cli_path register --log-level debug } -catch { - Write-Host "Error occurred: $_" - Write-Host "Stack trace: $($_.ScriptStackTrace)" - throw -} finally { Set-Location $original_dir Remove-Item -Recurse -Force $test_dir -ErrorAction SilentlyContinue