chore: Add the rest of the config builder test

This commit is contained in:
BluJ
2023-04-03 15:40:13 -06:00
parent 4184527d0d
commit fa53436ab2
2 changed files with 48 additions and 8 deletions

View File

@@ -1,12 +1,6 @@
import { BuilderExtract, IBuilder } from "./builder";
import { Config } from "./config";
import {
InputSpec,
ListValueSpecNumber,
ListValueSpecString,
UniqueBy,
ValueSpecList,
} from "../config-types";
import { InputSpec, ListValueSpecNumber, ListValueSpecString, UniqueBy, ValueSpecList } from "../config-types";
import { guardAll } from "../../util";
/**
* Used as a subtype of Value.list
@@ -102,7 +96,8 @@ export class List<A extends ValueSpecList> extends IBuilder<A> {
name: string;
description?: string | null;
warning?: string | null;
default: Record<string, unknown>[];
/** Default [] */
default?: Record<string, unknown>[];
/** Default = "(\*,\*)" */
range?: string;
},
@@ -123,6 +118,7 @@ export class List<A extends ValueSpecList> extends IBuilder<A> {
};
const value = {
spec,
default: [],
...a,
};
return new List({