Skip to content
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

add cancellationToken case #2463

Merged
merged 2 commits into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 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,23 @@ 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: {
yield: "ok",
qiaozha marked this conversation as resolved.
Show resolved Hide resolved
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
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
Loading