Skip to content

Conversation

@jeremymeng
Copy link
Member

No description provided.

Copilot AI review requested due to automatic review settings October 31, 2025 00:40
@jeremymeng jeremymeng requested a review from a team as a code owner October 31, 2025 00:40
@github-actions github-actions bot added KeyVault Mgmt This issue is related to a management-plane library. labels Oct 31, 2025
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 refactors test assertions across the keyvault packages to use more specific assertion methods instead of the generic assert.ok(). The changes improve test readability and provide clearer failure messages when assertions fail.

Key changes:

  • Replace assert.ok() with assert.isTrue() for boolean checks
  • Replace assert.ok(x instanceof Y) with assert.instanceOf(x, Y) for type checks
  • Replace assert.ok(x > y) with assert.isAbove(x, y) for numeric comparisons
  • Replace assert.ok(!x) with assert.isFalse(x) for negated boolean checks

Reviewed Changes

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

Show a summary per file
File Description
sdk/keyvault/keyvault-secrets/test/public/recoverBackupRestore.spec.ts Updated length comparison to use assert.isAbove
sdk/keyvault/keyvault-secrets/test/public/lro.recover.spec.ts Replaced assert.ok with assert.isTrue, assert.isFalse, and assert.instanceOf for poller state checks
sdk/keyvault/keyvault-secrets/test/public/lro.delete.spec.ts Replaced assert.ok with assert.isTrue, assert.isFalse, and assert.instanceOf for poller state checks
sdk/keyvault/keyvault-secrets/test/public/CRUD.spec.ts Updated Date instance checks to use assert.instanceOf
sdk/keyvault/keyvault-keys/test/public/node/localCryptography.spec.ts Updated verification result check to use assert.isTrue
sdk/keyvault/keyvault-keys/test/public/node/crypto.spec.ts Updated verification result checks to use assert.isTrue
sdk/keyvault/keyvault-keys/test/public/lro.recoverDelete.spec.ts Replaced assert.ok with assert.isTrue, assert.isFalse, and assert.equal for poller state checks
sdk/keyvault/keyvault-keys/test/public/lro.delete.spec.ts Replaced assert.ok with assert.isTrue, assert.isFalse, and assert.equal for poller state checks
sdk/keyvault/keyvault-keys/test/internal/recoverBackupRestore.spec.ts Updated length comparison to use assert.isAbove
sdk/keyvault/arm-keyvault/test/keyvault.spec.ts Updated array length check to use assert.isAbove

@jeremymeng jeremymeng force-pushed the test/kv-replace-assert-ok branch from cb75708 to 40096ac Compare October 31, 2025 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

KeyVault Mgmt This issue is related to a management-plane library.

Projects

Status: Untriaged

Development

Successfully merging this pull request may close these issues.

1 participant