Skip to content

Commit

Permalink
remove the nullified test cases and add a new one
Browse files Browse the repository at this point in the history
  • Loading branch information
ArcturusZhang committed Jun 15, 2024
1 parent 2b10cdf commit 0506f30
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ describe("typespec-client-generator-core: array types", () => {
strictEqual(property.type.valueType.kind, "int32");
});

it("write my own EmbeddingVector", async () => {
it("alias of EmbeddingVector", async () => {
const runnerWithCore = await createSdkTestRunner({
librariesToAdd: [AzureCoreTestLibrary],
autoUsings: ["Azure.Core"],
Expand All @@ -76,7 +76,8 @@ describe("typespec-client-generator-core: array types", () => {
await runnerWithCore.compileWithBuiltInAzureCoreService(`
@service({})
namespace TestClient {
model MyEmbeddingVector is EmbeddingVector<int32>;
alias MyEmbeddingVector = EmbeddingVector<int32>;
model ModelWithEmbeddingVector {
prop: MyEmbeddingVector;
}
Expand All @@ -89,10 +90,8 @@ describe("typespec-client-generator-core: array types", () => {
const model = models[0];
const property = model.properties[0];
strictEqual(property.type.kind, "array");
// TODO -- this might be problematic until we resolve https://github.com/Azure/typespec-azure/issues/1005
strictEqual(property.type.name, "MyEmbeddingVector");
// TODO -- this might be problematic until we resolve https://github.com/Azure/typespec-azure/issues/1005
strictEqual(property.type.namespace, "My.Service.TestClient"); // the compile with azure core method is implicitly adding the `My.Service` namespace.
strictEqual(property.type.name, "EmbeddingVector");
strictEqual(property.type.namespace, "Azure.Core");
strictEqual(property.type.valueType.kind, "int32");
});
});

0 comments on commit 0506f30

Please sign in to comment.