Skip to content

Commit 1968da9

Browse files
committed
[public-api] Add converter test case
1 parent f9aad7b commit 1968da9

File tree

3 files changed

+26
-4
lines changed

3 files changed

+26
-4
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"result": {
3+
"id": "test-id",
4+
"name": "TEST_VAR",
5+
"organizationId": "org-123"
6+
},
7+
"err": ""
8+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"id": "test-id",
3+
"name": "TEST_VAR",
4+
"orgId": "org-123"
5+
}

components/public-api/typescript-common/src/public-api-converter.spec.ts

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,13 @@ describe("PublicAPIConverter", () => {
106106

107107
it("toWorkspaceSession", async () => {
108108
await startFixtureTest("../fixtures/toWorkspaceSession_*.json", async (input) =>
109-
converter.toWorkspaceSession(input, new WorkspaceSession_Owner({
110-
id: "123",
111-
name: "Kum Quat"
112-
})),
109+
converter.toWorkspaceSession(
110+
input,
111+
new WorkspaceSession_Owner({
112+
id: "123",
113+
name: "Kum Quat",
114+
}),
115+
),
113116
);
114117
});
115118

@@ -183,6 +186,12 @@ describe("PublicAPIConverter", () => {
183186
);
184187
});
185188

189+
it("toOrganizationEnvironmentVariable", async () => {
190+
await startFixtureTest("../fixtures/toOrganizationEnvironmentVariable_*.json", async (input) =>
191+
converter.toOrganizationEnvironmentVariable(input),
192+
);
193+
});
194+
186195
it("toPrebuild", async () => {
187196
await startFixtureTest("../fixtures/toPrebuild_*.json", async (input) =>
188197
converter.toPrebuild(testGitpodHost, input),

0 commit comments

Comments
 (0)