Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tomokimiyauci/tytest
🃏 Deno-first type testing tools
https://github.com/tomokimiyauci/tytest
deno test testing tsd types typescript
Last synced: about 1 month ago
JSON representation
🃏 Deno-first type testing tools
- Host: GitHub
- URL: https://github.com/tomokimiyauci/tytest
- Owner: TomokiMiyauci
- License: mit
- Created: 2021-12-21T13:06:47.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-01-03T14:51:33.000Z (almost 3 years ago)
- Last Synced: 2024-11-13T09:52:41.161Z (about 1 month ago)
- Topics: deno, test, testing, tsd, types, typescript
- Language: TypeScript
- Homepage:
- Size: 525 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# tytest
Deno-first types testing tools
## What?
`tytest` lets you write tests for your type definitions by creating files with
the `*_test.ts` extension.This project was strongly influenced by
[tsd](https://github.com/SamVerschueren/tsd), and our current goal is to port
tsd to Deno.## Usage
Type assertions are strict. This means that if you expect the type to be `""`
but the argument is of type `string`, the tests will fail.```ts
import { expectType } from "https://deno.land/x/tytest@$VERSION/mod.ts";expectType("");
```then,
`deno run --unstable --allow-read --allow-write --allow-net https://deno.land/x/tytest@$VERSION/cli.ts`
## Known Issues
The custom module resolver is not implemented, so it does not work correctly for
remote modules. This is a priority issue.For example, the following module will be processed as `any`.
```ts
import { join } from "https://deno.land/[email protected]/path/mod.ts";
import { expectType } from "https://deno.land/x/tytest@$VERSION/mod.ts";expectType(join(""));
```## License
Copyright © 2021-present [TomokiMiyauci](https://github.com/TomokiMiyauci).
Released under the [MIT](./LICENSE) license