Skip to content
This repository was archived by the owner on May 15, 2025. It is now read-only.

Commit de00f63

Browse files
committed
chore: add type parameter for testRequiredVariables
1 parent 264584e commit de00f63

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,9 @@ export const findResourceInstance = <T extends string>(
133133
* Creates a test-case for each variable provided and ensures that the apply
134134
* fails without it.
135135
*/
136-
export const testRequiredVariables = (
136+
export const testRequiredVariables = <TVars extends Record<string, string>>(
137137
dir: string,
138-
vars: Record<string, string>,
138+
vars: TVars,
139139
) => {
140140
// Ensures that all required variables are provided.
141141
it("required variables", async () => {

windows-rdp/main.test.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { beforeAll, describe, expect, it, test } from "bun:test";
1+
import { describe, expect, it, test } from "bun:test";
22
import {
33
executeScriptInContainer,
44
runTerraformApply,
@@ -13,20 +13,20 @@ type TestVariables = Readonly<{
1313
admin_password?: string;
1414
}>;
1515

16-
describe("Web RDP", () => {
17-
beforeAll(async () => {
18-
await runTerraformInit(import.meta.dir);
19-
testRequiredVariables(import.meta.dir, {
20-
agent_id: "foo",
21-
resource_id: "bar",
22-
});
16+
describe("Web RDP", async () => {
17+
await runTerraformInit(import.meta.dir);
18+
testRequiredVariables<TestVariables>(import.meta.dir, {
19+
agent_id: "foo",
20+
resource_id: "bar",
2321
});
2422

2523
it("Installs the Devolutions Gateway Angular app locally on the machine", async () => {
2624
const state = await runTerraformApply<TestVariables>(import.meta.dir, {
2725
agent_id: "foo",
2826
resource_id: "bar",
2927
});
28+
29+
throw new Error("Not implemented yet");
3030
});
3131

3232
/**

0 commit comments

Comments
 (0)