-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Improve test coverage to ~100% for @azure/core-client #38176
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
Merged
Merged
Changes from all commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
834eb57
Improve test coverage to ~100% for @azure/core-client
3f2b5c5
Remove 'coverage' from test describe block names
44659d5
Remove 'edge cases' from describe block names
bee00b8
Extract repeated test constants into shared variables
33febd2
Fix TypeScript compilation errors caught by CI
b75d1e4
Format utils.spec.ts
2790ffc
Fix browser test: guard Buffer usage in base64.spec.ts (core-client)
498dc0a
Move Node-only base64 test to node/ folder (core-client)
8cdfca4
Fix test substance issues in core-client
21973ec
fix: remove line numbers from core-client test names
ae7ae2f
fix: use assert.isTrue instead of assert.equal(x, true) in serializer…
a7a91f0
fix: strengthen assertions in core-client tests
f83d579
fix: replace bare assert() with specific assertions in core-client tests
b489137
fix: remove line number from deserializationPolicy test name
91d429a
fix: resolve CI failures in core-client tests
feee24a
refactor: replace mutable request capture with vi.fn() in serviceClie…
d15ca39
refactor: remove unused request capture in assertServiceClientResponse
0898576
refactor: replace capturedRequest mutable capture with vi.fn() in ser…
2682405
fix: format serviceClient.ts test utility
ccd8fe1
refactor: modernize error assertions in core-client tests
cd07353
refactor: second pass modernization in core-client tests
69b77d7
refactor: second pass modernization in core-rest-pipeline tests
f5d92cd
fix: remove foreign package files from core-client branch
f61edef
refactor: modernize test patterns in core-client
9274809
Eliminate unnecessary type casts in core-client tests
bf534bc
Eliminate unnecessary type casts in core-client-rest tests
c453317
Strengthen weak isDefined assertions in core-client-rest tests
3239a5a
Strengthen weak isDefined assertions in core-client tests
d53a64e
fix: restore foreign core-client-rest files to main version
8da2c5b
fix: align test name with actual assertion (null, not undefined)
6cd6495
rename duplicate test name in serializationPolicy.spec.ts for clarity
f1e86f0
fix: align 9 test titles with actual assertions in core-client tests
a9271a2
Strengthen weak assertions in serialization and deserialization tests
bf8e099
Replace isAbove(x.length, 0) with isNotEmpty for consistency
4cea7c4
Address Jeremy review feedback on core-client tests
c717594
Strengthen XML body assertions with exact value verification
c75b036
Convert .catch(e => e) to expect().rejects.toMatchObject()
fef0a56
Fix TS2454: initialize request as undefined
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| // Copyright (c) Microsoft Corporation. | ||
| // Licensed under the MIT License. | ||
|
|
||
| import { describe, it, assert } from "vitest"; | ||
| import { encodeByteArray } from "../../src/base64.js"; | ||
|
|
||
| describe("base64", () => { | ||
| it("should handle Uint8Array input in encodeByteArray", () => { | ||
| const arr = new Uint8Array([72, 101, 108, 108, 111]); | ||
| const result = encodeByteArray(arr); | ||
| assert.strictEqual(result, "SGVsbG8="); | ||
| }); | ||
| }); |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.