Skip to content

Add integration tests - #368

Open
linglingye001 wants to merge 7 commits into
mainfrom
linglingye/integration-test
Open

linglingye001 wants to merge 7 commits into
mainfrom
linglingye/integration-test

Conversation

@linglingye001

@linglingye001 linglingye001 commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

Adds Node.js live-service integration tests to verify provider behavior against the dedicated appconfig-jsprovider-integrationtest store.

Coverage:

  • Loading key values/feature flags with selectors.
  • Parsing JSON values and constructing hierarchical configuration objects.
  • Refreshing key values/feature flags after updates, additions, and deletions.
  • Refreshing only when the watched sentinel’s label changes.

Test infrastructure

  • Adds npm run test:integration, compiling ESM tests and running them serially with Mocha/Chai.
  • Uses DefaultAzureCredential for authentication and the SDK to manage fixtures.
  • Isolates each test with a unique prefix and cleans up only its tracked keys and labels.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

Static review found no blocking issues in the test-only changes, fixture isolation, cleanup, or execution command.

No open issues 🎉

What changed in this PR

Adds live-service integration coverage for the JavaScript provider against the dedicated App Configuration test store, without changing production code.

Changes:

  • Covers selector-based loading, JSON parsing, hierarchical configuration, and key-value and feature-flag refresh.
  • Adds isolated fixtures with tracked cleanup, refresh polling, response tracking, and helper unit tests.
  • Adds a serial ESM integration-test command using DefaultAzureCredential authentication.
File Description
test/​integrationHelpers.test.ts Tests fixture isolation, cleanup, polling, and response tracking.
test/​integration/​refresh.test.ts Tests collection refresh and label-specific sentinel monitoring.
test/​integration/​load.test.ts Tests loading values with key and label selectors.
test/​integration/​json.test.ts Tests JSON parsing and hierarchical configuration construction.
test/​integration/​helpers.ts Provides isolated fixtures, cleanup, polling, and response tracking.
test/​integration/​featureFlag.test.ts Tests feature-flag selection and independent refresh.
package.json Adds the serial integration-test command.

Review effort: Balanced

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.

3 participants