Skip to content

test(feed): add comprehensive integration tests#84

Merged
ascorbic merged 1 commit intomainfrom
add-feed-loader-integration-tests
Jun 21, 2025
Merged

test(feed): add comprehensive integration tests#84
ascorbic merged 1 commit intomainfrom
add-feed-loader-integration-tests

Conversation

@ascorbic
Copy link
Copy Markdown
Owner

Summary

  • Add comprehensive integration test suite for the feed loader
  • Replace placeholder hello.test.ts with robust test coverage
  • Add MSW for controlled HTTP mocking and real network testing

Test Coverage Added

  • HTTP Conditional Requests: ETag and Last-Modified header handling, 304 responses
  • Feed Format Support: RSS 2.0, Atom 1.0, RDF/RSS 1.0 parsing tests
  • Error Handling: Network failures, malformed feeds, HTTP errors, timeouts
  • Edge Cases: Missing GUIDs, character encodings, content types, large feeds
  • Real Feed Integration: Tests against GitHub releases and live RSS feeds
  • Astro Interface: Loader compliance, data store integration, schema validation

Technical Details

  • 39 tests covering all major feed loader functionality
  • Test fixtures for different feed formats and edge cases
  • MSW setup allows both mocked and real network requests
  • Proper TypeScript integration with Vitest configuration

Test Results

All tests pass, providing confidence in feed parsing reliability, HTTP caching behavior, and error handling.

🤖 Generated with Claude Code

- Add MSW for HTTP mocking in tests
- Create test fixtures for RSS 2.0, Atom, RDF, and edge case feeds
- Implement HTTP conditional request tests (ETags, Last-Modified, 304 responses)
- Add error handling tests for network failures and malformed feeds
- Test feed parsing edge cases (missing GUIDs, encodings, content types)
- Include real feed integration tests against stable external feeds
- Verify Astro loader interface compliance and data store integration
- Replace placeholder hello.test.ts with comprehensive test suite

All 39 tests pass, providing robust coverage of feed parsing, HTTP caching,
and error handling scenarios.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Jun 21, 2025

⚠️ No Changeset found

Latest commit: 0a76a0e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@netlify
Copy link
Copy Markdown

netlify Bot commented Jun 21, 2025

Deploy Preview for astro-loaders ready!

Name Link
🔨 Latest commit 0a76a0e
🔍 Latest deploy log https://app.netlify.com/projects/astro-loaders/deploys/685678a122c8c50008c94e94
😎 Deploy Preview https://deploy-preview-84--astro-loaders.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@ascorbic ascorbic merged commit 19bc430 into main Jun 21, 2025
6 checks passed
@ascorbic ascorbic deleted the add-feed-loader-integration-tests branch June 21, 2025 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant