-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[test][storage] replace assert.ok with specific assertions #36407
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[test][storage] replace assert.ok with specific assertions #36407
Conversation
API Change CheckAPIView identified API level changes in this PR and created the following API reviews |
There was a problem hiding this 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 pull request updates test assertions across multiple Azure Storage SDK test files from generic assert.ok() calls to more specific and semantically meaningful assertion methods from the test assertion library. The changes improve test clarity and maintainability by making assertions more explicit about their intent.
Key changes:
- Replaced
assert.ok()with specific assertions likeassert.isDefined(),assert.isTrue(),assert.isFalse(), etc. - Updated equality checks from
assert.ok(x === y)toassert.strictEqual(x, y) - Changed string inclusion checks from
assert.ok(str.includes(substr))toassert.include(str, substr) - Modernized comparison assertions to use
assert.isAbove(),assert.isAtLeast(), etc.
Reviewed Changes
Copilot reviewed 70 out of 70 changed files in this pull request and generated 24 comments.
Show a summary per file
| File | Description |
|---|---|
| storage-queue/test/utils.spec.ts | Updated assertions for URL and header sanitization tests |
| storage-queue/test/queueserviceclient.spec.ts | Improved assertions for queue service operations |
| storage-queue/test/queueclientmessages.spec.ts | Enhanced message operation test assertions |
| storage-queue/test/queueclient.spec.ts | Refined queue client test assertions |
| storage-queue/test/node/*.spec.ts | Updated Node.js-specific test assertions |
| storage-queue/test/aborter.spec.ts | Improved aborter test assertions |
| storage-internal-avro/test/**/*.spec.ts | Enhanced Avro reader test assertions |
| storage-file-share/test/**/*.spec.ts | Comprehensive assertion updates for file share tests |
| storage-file-datalake/test/**/*.spec.ts | Enhanced Data Lake test assertions |
02e43ab to
956ab11
Compare
No description provided.