Skip to content

Commit

Permalink
Wrote some tests to check correctness
Browse files Browse the repository at this point in the history
  • Loading branch information
JPMeehan committed Nov 6, 2024
1 parent 0f58b4f commit 44d2f39
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/foundry/common/data/fields.test-d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,3 +140,12 @@ const _emptyOptions = {} satisfies DataField.Options.Default<number>;
new foundry.data.fields.BooleanField({
label: "foo",
});

// Name should not be required because it's filled in by the field's `fieldPath` property
stringField.toInput({ value: 'foo' })

// @ts-expect-error StringField input values MUST be valid for the field
stringField.toInput({ value: 200 })

// Inputs generated from a StringField should accept additional CONFIG properties from `createSelectInput`
stringField.toInput({ blank: true })

0 comments on commit 44d2f39

Please sign in to comment.