https://github.com/aleclarson/spec.ts
Write tests for your types!
https://github.com/aleclarson/spec.ts
testing tool typescript
Last synced: 2 months ago
JSON representation
Write tests for your types!
- Host: GitHub
- URL: https://github.com/aleclarson/spec.ts
- Owner: aleclarson
- License: mit
- Archived: true
- Created: 2019-04-11T14:24:45.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-04-24T17:57:03.000Z (about 5 years ago)
- Last Synced: 2024-10-02T13:18:08.335Z (9 months ago)
- Topics: testing, tool, typescript
- Language: JavaScript
- Homepage:
- Size: 42 KB
- Stars: 57
- Watchers: 3
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# spec.ts
[](https://www.npmjs.com/package/spec.ts) [](https://travis-ci.org/aleclarson/spec.ts)
Write tests for your types!
```ts
import { assert, _ } from "spec.ts";// Assert two expressions have the same exact type
assert(foo, bar);// Assert the exact type of an expression
assert(foo, _ as ExpectedType);
```- [Usage from CLI](https://github.com/aleclarson/spec.ts/wiki/Usage-from-CLI)
- [Usage with Jest](https://github.com/aleclarson/spec.ts/wiki/Usage-with-Jest)