This repository has been archived by the owner on Oct 18, 2022. It is now read-only.
Remove custom test script (and ts-node) when tsd is updated #21
Labels
type: maintenance
Project maintenance stuff
In #20, I added a custom test script (
run-tests.ts
) to work around a limitation in tsd, our testing tool. Because tsd 0.14.0 does not support thetypesVersions
property inpackage.json
, it cannot find our typings when invoked from the shell. Since it does not provide any mechanism for specifying a custom type source, we need to temporarily supply atypes
field inpackage.json
.To work around this, I wrote a tiny Node.js script (
run-tests.ts
) that monkey-patchespackage.json
with atypes
field before runningtsd
, then restore the original afterwards. I also installed ts-node to avoid an extra compile step when running the script.The
main
branch of tsd has recently gained support for custom type sources. Another PR adds an accompanying CLI option for this. If the next release of tsd includes these changes, we may be able to replace this script with an invocation oftsd --typings-file src/index.d.ts
.TODO
tsd
from the command line instead@types/node
The text was updated successfully, but these errors were encountered: