## Changes made - Removed all unused imports, and made sure type imports were labeled correctly - Updated all comparisons to be more strict - Simplified loops to remove unneeded closure functions - Removed all explicit `any` types - Updated how strings were defined to follow general TypeScript best practices ## Notes - We definitely want some kind of linting setup for this repo. I'm going to bring this up when Blueberry has its next team meeting next week
34 lines
956 B
TypeScript
34 lines
956 B
TypeScript
import { describe, expect, it } from "bun:test";
|
|
import {
|
|
runTerraformApply,
|
|
runTerraformInit,
|
|
testRequiredVariables,
|
|
} from "../test";
|
|
|
|
describe("exoscale-zone", async () => {
|
|
await runTerraformInit(import.meta.dir);
|
|
|
|
testRequiredVariables(import.meta.dir, {});
|
|
|
|
it("default output", async () => {
|
|
const state = await runTerraformApply(import.meta.dir, {});
|
|
expect(state.outputs.value.value).toBe("");
|
|
});
|
|
|
|
it("customized default", async () => {
|
|
const state = await runTerraformApply(import.meta.dir, {
|
|
default: "at-vie-1",
|
|
});
|
|
expect(state.outputs.value.value).toBe("at-vie-1");
|
|
});
|
|
|
|
it("set custom order for coder_parameter", async () => {
|
|
const order = 99;
|
|
const state = await runTerraformApply(import.meta.dir, {
|
|
coder_parameter_order: order.toString(),
|
|
});
|
|
expect(state.resources).toHaveLength(1);
|
|
expect(state.resources[0].instances[0].attributes.order).toBe(order);
|
|
});
|
|
});
|