Skip to content

Conversation

@jeremymeng
Copy link
Member

No description provided.

Copilot AI review requested due to automatic review settings October 31, 2025 16:59
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 replaces assert.ok() with assert.isDefined() throughout test files in the metrics advisor SDK. The change improves test assertion clarity by using a more specific assertion method that explicitly checks if a value is not undefined or null, rather than relying on truthiness checks.

Key Changes

  • Replaced all instances of assert.ok() with assert.isDefined() for checking if values exist
  • Reformatted some multi-line assertion calls for better code consistency

Reviewed Changes

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

Show a summary per file
File Description
hookTests.spec.ts Updated assertions for hook creation and hook listing tests to use isDefined
datafeed.spec.ts Updated assertions for data feed creation, updates, and listing operations to use isDefined
dataSourceCred.spec.ts Updated assertions for data source credential operations to use isDefined
advisorclient.spec.ts Updated assertions for anomaly detection, alerts, feedback, and metric operations to use isDefined
adminclient.spec.ts Updated assertions for ingestion status, detection configs, and alert config operations to use isDefined

@jeremymeng jeremymeng marked this pull request as draft October 31, 2025 17:25
@jeremymeng jeremymeng force-pushed the test/ma-replace-assert-ok branch from 39265e5 to ed70262 Compare October 31, 2025 17:45
@jeremymeng jeremymeng marked this pull request as ready for review October 31, 2025 18:15
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