Skip to content

chore(tests): updated test files per functionality#218

Merged
petruki merged 3 commits intomasterfrom
staging
Mar 22, 2026
Merged

chore(tests): updated test files per functionality#218
petruki merged 3 commits intomasterfrom
staging

Conversation

@petruki
Copy link
Copy Markdown
Member

@petruki petruki commented Mar 22, 2026

This pull request introduces several improvements to testing, ESLint configuration, and dependency management. The main highlights are the addition of comprehensive remote context validation tests, updates to ESLint configuration for better maintainability, and dependency upgrades for improved compatibility and security. Additionally, the structure and coverage of integration and local tests have been enhanced.

Testing Improvements:

  • Added a new test suite switcher-context.test.js to validate remote context building, including checks for invalid certificate paths and missing required fields in the context settings.
  • Enhanced the integration test suite switcher-integrated.test.js with new tests for loading snapshots from the remote API and checking Switcher availability, along with refactoring to use shared context settings. [1] [2]
  • Renamed and refactored the local test suite from switcher-client.test.js to switcher-local.test.js, streamlined imports, and improved test descriptions for clarity. [1] [2] [3]
  • Removed redundant or placeholder test suites and type checks from the local test file to focus on core E2E scenarios.

ESLint Configuration and Dependency Updates:

  • Refactored eslint.config.js to use the modern defineConfig API, simplified configuration, and added a rule to warn on unused variables prefixed with _.
  • Upgraded development dependencies in package.json, including eslint, c8, @typescript-eslint packages, and sinon, to their latest versions for improved compatibility and security.

Test Helper Updates:

  • Updated the dummy certificate in tests/helper/dummy-cert.pem with a valid certificate for improved test reliability.

@petruki petruki self-assigned this Mar 22, 2026
@petruki petruki added documentation Improvements or additions to documentation enhancement New feature or request dependencies Pull requests that update a dependency file labels Mar 22, 2026
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Mar 22, 2026

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

@petruki petruki merged commit e701c81 into master Mar 22, 2026
23 of 24 checks passed
@petruki petruki deleted the staging branch March 22, 2026 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant