mirror of
https://github.com/hanzoai/azure-sdk-for-js.git
synced 2026-10-30 19:51:51 +00:00
## Description
Fix 303 swapped assertion arguments across 45 test files where a
constant literal was incorrectly passed as the first (`actual`) argument
instead of the second (`expected`) argument.
For example:
```typescript
// Before (incorrect): constant in actual position
assert.equal(200, res.statusCode);
// After (correct): actual value first, expected constant second
assert.equal(res.statusCode, 200);
```
### Assertion methods fixed
- `assert.equal`
- `assert.strictEqual`
- `assert.deepEqual`
- `assert.deepStrictEqual`
- `assert.notEqual`
- `assert.notDeepEqual`
### Constant types caught
Number literals, string literals, boolean literals (`true`/`false`),
`null`, `undefined`, object literals (`{}`), and array literals (`[]`).
### Packages affected
appconfiguration, attestation, core-client, cosmosdb, deviceupdate,
easm, eventgrid, healthdataaiservices, keyvault, loadtesting, search,
servicebus, storage (blob, datalake, avro, changefeed), textanalytics,
translation, and web-pubsub.
This is a test-only change with no functional impact, but correcting
argument order ensures assertion failure messages display the actual vs
expected values correctly.
Co-authored-by: Copilot <[email protected]>