kentcdodds / jest-glamor-react

Jest utilities for Glamor and React
https://npm.im/jest-glamor-react
MIT License
98 stars 24 forks source link

feat(typescript): Added typescript definition file #9

Closed luke-john closed 7 years ago

luke-john commented 7 years ago

What: Added Typescript definition.

Why: We wanted to use it for snapshots with out typescript tests.

codecov-io commented 7 years ago

Codecov Report

Merging #9 into master will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff          @@
##           master     #9   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           3      3           
  Lines          92     92           
  Branches       17     17           
=====================================
  Hits           92     92

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update c251b1e...ef887f8. Read the comment docs.

kentcdodds commented 7 years ago

ping? :)

luke-john commented 7 years ago

Sorry about the lack of responses on this pr.

Looking at the current documentation this pr is not useful anymore given this is used via adding to the jest config.

The advantage of having type defs when you had to do something like follows is that without them your tests won't compile if you are using typescript with strict settings.

import {matcher, serializer} from 'jest-glamor-react'
expect.addSnapshotSerializer(serializer)
expect.extend(matcher)