Closed angeloashmore closed 2 years ago
That'd be great to have indeed! To me should go through a types
script, update the test
one and add an extra step in the CI workflow.
I'm unsure in which folder those test files should live though 🤔
To me should go through a types script, update the test one and add an extra step in the CI workflow.
Yep, that makes sense to me.
I started adding tests in the aa/test
branch and opened a WIP PR here: #15.
I placed type tests in /test
using this file name pattern: ${category}-${specificCategory}.types.ts
where:
category
maps to a filename in /src
(which generally is a category of types/APIs)specificCategory
is a category within category
Example: fields-image.types.ts
The type test script just runs tsc --noEmit
to ensure everything compiles. If a type error is present in any of the .types.ts
files, tsc
will fail to compile.
Completed
Is your feature request related to a problem? Please describe.
The library currently does not contain tests. The types should be tested against known-good data shapes.
Describe the solution you'd like
Create
.ts
files that are typed using the library's definitions. If the.ts
files can be compiled withtsc
, the tests pass.For example, testing
SelectField
could look like this:Describe alternatives you've considered
None.
Additional context
N/A