-
Notifications
You must be signed in to change notification settings - Fork 545
test: Separate faucet tests from local integration tests #2985
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
WalkthroughA new Jest configuration for faucet tests was introduced in the Changes
Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
npm warn config production Use Note ⚡️ AI Code Reviews for VS Code, Cursor, WindsurfCodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback. Note ⚡️ Faster reviews with cachingCodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 16th. To opt out, configure ✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
packages/xrpl/jest.config.integration.js (1)
12-12
: Verify the ignore pattern for faucet tests
testPathIgnorePatterns
uses regexp strings to skip test paths. Your pattern'<rootDir>/test/faucet/'
may not match nested test files. Consider appending.*
(e.g.,'<rootDir>/test/faucet/.*'
) or using a regex like'/test\/faucet\//'
to ensure all faucet tests are excluded from integration runs.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting
📒 Files selected for processing (3)
packages/xrpl/jest.config.faucet.js
(1 hunks)packages/xrpl/jest.config.integration.js
(2 hunks)packages/xrpl/package.json
(1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
packages/xrpl/jest.config.faucet.js (1)
packages/xrpl/jest.config.integration.js (1)
base
(2-2)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Socket Security: Pull Request Alerts
🔇 Additional comments (5)
packages/xrpl/package.json (1)
63-64
: Added dedicated faucet and composite test scripts
The newtest:faucet
andtest:all
scripts correctly integrate the faucet-specific Jest config and orchestrate sequential execution of all test suites, aligning with the PR’s goal to decouple external-service tests from local integration tests.packages/xrpl/jest.config.faucet.js (4)
2-2
: Import shared base Jest configuration
Reusingjest.config.base.js
maintains consistency across all test suites and reduces duplication.
5-7
: Extend test roots and set longer timeout for faucet tests
Including<rootDir>/test
inroots
ensures Jest discovers faucet tests, and increasingtestTimeout
to 60000 ms accommodates potential delays when interacting with public faucet endpoints.
8-11
: Restrict test matching to faucet directory
ThetestMatch
patterns target only.test.ts
files undertest/faucet/
, effectively isolating faucet tests from unit and integration suites.
12-12
: Distinct display name for the faucet suite
Naming this suitexrpl.js-faucet
will make it easy to identify in CI logs and local outputs.
High Level Overview of Change
This PR separates faucet-specific tests (which connect to external networks) from local integration tests in the xrpl.js library.
fixes #2615
Changes include:
/test/faucet/
directory structure for tests that depend on external faucet servicesfundWallet.test.ts
from integration to faucet directoryContext of Change
Our integration test suite previously combined tests that run against a local rippled server with tests that connect to public testnet/devnet networks and use faucet services. This combination caused several issues:
This refactoring creates a clear separation between local integration tests and faucet tests, allowing them to be run independently while maintaining the ability to run all tests when needed.
Type of Change
Did you update HISTORY.md?
Test Plan
Future Tasks