Skip to content

Introduce Testing Plan and Implement Runtime Module Tests for NodeJs - #88

Merged
mrunalhirve128 merged 21 commits into
mainfrom
users/mrunalhirve/NodeJsUnitTests
Dec 5, 2025
Merged

Introduce Testing Plan and Implement Runtime Module Tests for NodeJs#88
mrunalhirve128 merged 21 commits into
mainfrom
users/mrunalhirve/NodeJsUnitTests

Conversation

@mrunalhirve128

@mrunalhirve128 mrunalhirve128 commented Nov 25, 2025

Copy link
Copy Markdown
Contributor
image

Fix coverage
image

@mrunalhirve128
mrunalhirve128 marked this pull request as ready for review December 4, 2025 05:25
@mrunalhirve128
mrunalhirve128 requested a review from a team as a code owner December 4, 2025 05:25
Copilot AI review requested due to automatic review settings December 4, 2025 05:25
@mrunalhirve128
mrunalhirve128 requested a review from a team as a code owner December 4, 2025 05:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces a comprehensive testing framework for the Agent365-nodejs SDK, implementing unit tests for runtime modules and reorganizing the test infrastructure. The changes establish a foundation for systematic testing across all SDK packages, with clear documentation and tooling.

Key Changes

  • New Jest Configuration: Migrated from JSON to CommonJS configuration (jest.config.cjs) with comprehensive coverage settings and module name mapping
  • Runtime Module Tests: Added complete test suites for utility, power-platform-api-discovery, environment-utils, and agentic-authorization-service
  • Import Path Migration: Updated observability tests to import from source (src/) rather than built (dist/cjs/) paths for consistency

Reviewed changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
tests/jest.config.cjs New comprehensive Jest configuration with module mapping, coverage settings, and CommonJS format
tests/jest.config.json Removed old JSON configuration in favor of CommonJS
tests/tsconfig.json Removed rootDir constraint and added ../packages/*/src/**/* to include to support source imports
tests/package.json Updated package name, description, and test scripts to reference new jest.config.cjs
tests/runtime/utility.test.ts New comprehensive tests for GetAppIdFromToken and ResolveAgentIdentity functions
tests/runtime/power-platform-api-discovery.test.ts New tests covering cluster categories, token audiences, and endpoint generation
tests/runtime/environment-utils.test.ts New tests for environment utilities including cluster categories and authentication scopes
tests/runtime/agentic-authorization-service.test.ts New tests for agentic authentication token exchange
tests/observability/core/scopes.test.ts Updated imports from dist paths to src paths using package exports
tests/observability/core/observabilityBuilder-options.test.ts Migrated imports to src paths and updated mock paths
tests/observability/core/SpanProcessor.test.ts Updated imports to use src paths consistently
tests/observability/core/BaggageBuilder.test.ts Migrated imports to src paths
tests/observability/extension/openai/OpenAIAgentsTraceInstrumentor.test.ts Added explicit enable() call with improved comment clarity
tests/common/power-platform-api-discovery.test.ts Removed (tests moved to tests/runtime directory)
tests/TEST_PLAN.md New comprehensive testing strategy and implementation roadmap documentation
tests/RUNNING_TESTS.md New guide for running tests, generating coverage, and troubleshooting
tests/README.md New overview documentation for the test suite
package.json Added test:coverage script (references incorrect config file)

Comment thread tests/jest.config.cjs Outdated
Comment thread tests/RUNNING_TESTS.md Outdated
Comment thread package.json Outdated
Comment thread tests/runtime/agentic-authorization-service.test.ts
Comment thread tests/observability/extension/openai/OpenAIAgentsTraceInstrumentor.test.ts Outdated
Copilot AI review requested due to automatic review settings December 4, 2025 07:27

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 18 out of 18 changed files in this pull request and generated 2 comments.

Comment thread tests/RUNNING_TESTS.md Outdated
Comment thread tests/RUNNING_TESTS.md Outdated
pontemonti
pontemonti previously approved these changes Dec 4, 2025
Copilot AI review requested due to automatic review settings December 4, 2025 09:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 19 out of 19 changed files in this pull request and generated 1 comment.

Comment thread tests/TEST_PLAN.md Outdated
mrunalhirve128 and others added 2 commits December 4, 2025 01:04
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings December 4, 2025 09:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 19 out of 19 changed files in this pull request and generated no new comments.

Copilot AI review requested due to automatic review settings December 5, 2025 05:23

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Comment thread packages/agents-a365-observability-hosting/package.json
Comment thread tests/runtime/agentic-authorization-service.test.ts
@mrunalhirve128
mrunalhirve128 merged commit d5bd830 into main Dec 5, 2025
7 checks passed
@mrunalhirve128
mrunalhirve128 deleted the users/mrunalhirve/NodeJsUnitTests branch December 5, 2025 20:44
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.

6 participants