Skip to content

Implement Spector integration tests for encode/array#3803

Merged
v-jiaodi merged 6 commits intomainfrom
copilot/implement-spector-tests-encode-array-again
Mar 4, 2026
Merged

Implement Spector integration tests for encode/array#3803
v-jiaodi merged 6 commits intomainfrom
copilot/implement-spector-tests-encode-array-again

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 28, 2026

Adds Azure Modular integration test coverage for the encode/array Spector scenarios, which test JSON body serialization of arrays using various delimiters (commaDelimited, spaceDelimited, pipeDelimited, newlineDelimited) across string, enum, and extensible enum array property types.

Changes

  • test/commands/cadl-ranch-list.js — Added encode/array entry to azureModularTsps
  • test/azureModularIntegration/generated/encode/array/ — Added tspconfig.yaml, .gitignore, and generated src/index.d.ts for the ArrayClient
  • test/azureModularIntegration/encodeArray.spec.ts — 12 test cases covering all mockapi scenarios via client.property.<delimiter>Delimited() operations

Example

// Each scenario POSTs an array and expects the same array back
// (serialized/deserialized via the delimiter encoding)
const result = await client.property.commaDelimited({ value: ["blue", "red", "green"] });
assert.deepEqual(result.value, ["blue", "red", "green"]);
// Wire: { "value": "blue,red,green" }

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.
fixes #3700

Co-authored-by: v-jiaodi <80496810+v-jiaodi@users.noreply.github.com>
Copilot AI changed the title [WIP] Add spector tests for encode array Implement Spector integration tests for encode/array Feb 28, 2026
@v-jiaodi
Copy link
Copy Markdown
Member

v-jiaodi commented Mar 2, 2026

@copilot revert package.json and pnpm-lock.yaml change.

Co-authored-by: v-jiaodi <80496810+v-jiaodi@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Mar 2, 2026

@copilot revert package.json and pnpm-lock.yaml change.

Done. Reverted packages/typespec-ts/package.json and pnpm-lock.yaml to their original state in commit 0c4b31f.

@v-jiaodi v-jiaodi marked this pull request as ready for review March 3, 2026 07:10
@v-jiaodi
Copy link
Copy Markdown
Member

v-jiaodi commented Mar 3, 2026

LGTM

@v-jiaodi v-jiaodi merged commit fbbf51f into main Mar 4, 2026
16 checks passed
@v-jiaodi v-jiaodi deleted the copilot/implement-spector-tests-encode-array-again branch March 4, 2026 01:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Supplement spector case for encode array

3 participants