Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aleclarson/spec.ts
Write tests for your types!
https://github.com/aleclarson/spec.ts
testing tool typescript
Last synced: 3 months ago
JSON representation
Write tests for your types!
- Host: GitHub
- URL: https://github.com/aleclarson/spec.ts
- Owner: aleclarson
- License: mit
- Created: 2019-04-11T14:24:45.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-04-24T17:57:03.000Z (over 4 years ago)
- Last Synced: 2024-07-05T00:07:33.784Z (4 months ago)
- Topics: testing, tool, typescript
- Language: JavaScript
- Homepage:
- Size: 42 KB
- Stars: 56
- Watchers: 3
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# spec.ts
[![npm](https://img.shields.io/npm/v/spec.ts.svg)](https://www.npmjs.com/package/spec.ts) [![Build Status](https://travis-ci.org/aleclarson/spec.ts.svg?branch=master)](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)