Skip to content

Conversation

@jeremymeng
Copy link
Member

No description provided.

Copilot AI review requested due to automatic review settings October 30, 2025 21:29
Copy link
Contributor

Copilot AI left a comment

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 updates test assertions across multiple core packages to use more explicit and semantically clear assertion methods from the testing framework. The changes replace generic assert.ok() and assert.notOk() calls with more specific assertion methods like assert.isTrue(), assert.isFalse(), assert.isDefined(), and assert.instanceOf().

Key changes:

  • Replacing assert.ok() with assert.isTrue() for boolean checks
  • Replacing assert.notOk() with assert.isFalse() for negative boolean checks
  • Replacing assert.ok(value) with assert.isDefined(value) for existence checks
  • Replacing assert.ok(value instanceof Type) with assert.instanceOf(value, Type)
  • Replacing assert.ok(length === n) with assert.equal(length, n) for numeric comparisons

Reviewed Changes

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

Show a summary per file
File Description
sdk/core/ts-http-runtime/test/node/userAgentPlatform.spec.ts Updated assertions for platform-specific user agent data checks
sdk/core/ts-http-runtime/test/node/nodeHttpClient.spec.ts Updated assertions for HTTP response body stream checks
sdk/core/ts-http-runtime/test/multipartPolicy.spec.ts Updated assertions for content-type header presence checks
sdk/core/ts-http-runtime/test/logger/logger.spec.ts Updated assertions for logger enabled state checks
sdk/core/ts-http-runtime/test/formDataPolicy.spec.ts Updated assertions for multipart body and parts length checks
sdk/core/ts-http-runtime/test/browser/userAgentPlatform.spec.ts Updated assertions for browser platform checks
sdk/core/logger/test/logger.spec.ts Updated assertions for logger enabled state checks
sdk/core/core-xml/test/xml.spec.ts Updated assertions for error instance type checks
sdk/core/core-tracing/test/interfaces.spec.ts Updated assertions for tracing options existence checks
sdk/core/core-rest-pipeline/test/node/userAgentPlatform.spec.ts Updated assertions for platform-specific user agent data checks
sdk/core/core-rest-pipeline/test/node/nodeHttpClient.spec.ts Updated assertions for HTTP response body stream checks
sdk/core/core-rest-pipeline/test/node/formDataPolicy.spec.ts Updated assertions for multipart body parts length checks
sdk/core/core-rest-pipeline/test/node/bearerTokenAuthenticationPolicyChallenge.spec.ts Updated assertions for error object existence checks
sdk/core/core-rest-pipeline/test/multipartPolicy.spec.ts Updated assertions for content-type header presence checks
sdk/core/core-rest-pipeline/test/formDataPolicy.spec.ts Updated assertions for multipart body parts length checks
sdk/core/core-rest-pipeline/test/browser/userAgentPlatform.spec.ts Updated assertions for browser platform checks
sdk/core/core-lro/test/public/lro.spec.ts Updated assertions for state property existence checks
sdk/core/core-client/test/serviceClient.spec.ts Updated assertions for response body existence checks
sdk/core/core-auth/test/index.spec.ts Updated assertions for credential type check results
sdk/core/core-amqp/test/requestResponse.spec.ts Updated assertions for error type checks
sdk/core/core-amqp/test/message.spec.ts Updated assertions for message property existence checks
sdk/core/core-amqp/test/cbs.spec.ts Updated assertions for error type checks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant