Skip to content

Commit

Permalink
add cancellationToken case (#2463)
Browse files Browse the repository at this point in the history
* add cancellationToken case

* update
  • Loading branch information
kazrael2119 authored Apr 22, 2024
1 parent 6cb156d commit d7bf44b
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
16 changes: 15 additions & 1 deletion packages/typespec-ts/test/integration/specialWords.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -783,8 +783,22 @@ describe("SpecialWordsClient Rest Client", () => {
assert.fail(err as string);
}
});
it("should get special words for operation `cancellationToken`", async () => {
try {
const result = await client
.path("/special-words/parameters/cancellationToken")
.get({
queryParameters: {
cancellationToken:"ok"
}
});
assert.strictEqual(result.status, "204");
} catch (err) {
assert.fail(err as string);
}
});
});

describe("models", () => {
it("should get special words for operation `and`", async () => {
try {
Expand Down
10 changes: 10 additions & 0 deletions packages/typespec-ts/test/modularIntegration/specialWords.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -613,6 +613,16 @@ describe("Special Words Client", () => {
}
});


it("should post parameters withCancellationToken", async () => {
try {
const result = await client.parameters.withCancellationToken("ok");
assert.equal(result , undefined);
} catch (err) {
assert.fail(err as string);
}
});

it("should post models withAnd", async () => {
try {
const result = await client.models.withAnd({
Expand Down

0 comments on commit d7bf44b

Please sign in to comment.