Skip to content

Commit 7e137e8

Browse files
v-jiaodiqiaozha
andauthored
Refactor existing modular unit tests as scenario tests (#2915)
* update anonymous modular ut test with scenarios * update modular ut test with scenarios * update * fix format issues * update clientContext * update * update * resolve model references * remove unused imports * add modelsGenerator test case * update case * remove .only * The same case has been moved to scenarios * update case --------- Co-authored-by: qiaozha <qiaozha@microsoft.com> Co-authored-by: Qiaoqiao Zhang <55688292+qiaozha@users.noreply.github.com>
1 parent 4eb5849 commit 7e137e8

18 files changed

Lines changed: 7157 additions & 7022 deletions

File tree

packages/typespec-ts/src/modular/buildClassicalClient.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,9 @@ export function buildClassicalClient(
108108
});
109109

110110
constructor.addStatements([
111-
`this._client = create${modularClientName}(${paramNames.join(",")})`
111+
`this._client = create${modularClientName}(${paramNames.join(",")});`
112112
]);
113-
constructor.addStatements(`this.pipeline = this._client.pipeline`);
113+
constructor.addStatements(`this.pipeline = this._client.pipeline;`);
114114

115115
buildClientOperationGroups(clientFile, _client, dpgContext, clientClass);
116116
importAllApis(clientFile, srcPath, subfolder);

packages/typespec-ts/src/modular/helpers/clientHelpers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ export function buildGetClientOptionsParam(
228228
expr += `credentials: ${credentials},`;
229229
}
230230

231-
expr += `}`;
231+
expr += `};`;
232232

233233
context.addStatements(expr);
234234
return "updatedOptions";

packages/typespec-ts/test/modularIntegration/encodeDatetime.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { assert } from "chai";
22
import { DatetimeClient } from "./generated/encode/datetime/src/index.js";
3-
describe.only("EncodeDatetimeClient Rest Client", () => {
3+
describe("EncodeDatetimeClient Rest Client", () => {
44
let client: DatetimeClient;
55

66
beforeEach(() => {

0 commit comments

Comments
 (0)