cssinjs/jss

[all] Add tests for Typescript definition files

Open

#964 opened on Dec 31, 2018

View on GitHub
 (5 comments) (0 reactions) (1 assignee)JavaScript (7,000 stars) (434 forks)batch import
complexity:moderatehelp wantedimportanttypescript

Description

Expected behavior: Any typescript definitions exported from this library should be tested, otherwise it can cause real pain and doubt for ts users.

Describe the bug: https://github.com/cssinjs/jss/pull/889#issuecomment-447220080 was integrated without tests. It did not start with @types/jss package and we have no guarantee compatibility.

Versions (please complete the following information):

  • jss: 9 to 10.alpha.3

Context Changelog from 9->10 should address user's removal of @types/jss as a requirement otherwise conflicts will arise. As-is, I am seeing app errors downstream of material-ui 3.8.1 because of a mix of type use between 9.x and 10.x. It is not easy or apparent there, but is within our app. Investigating in material-ui, different packages require different versions of jss, but ultimately the root of the yarn workspace has 10.alpha.3 and @types/jss. It just so happens that the tests/usage there passes, but does not in the downstream app.

For samples of typescript testing, check out material-ui https://github.com/mui-org/material-ui and usage tests such as https://github.com/mui-org/material-ui/tree/master/packages/material-ui/test/typescript

/cc @appsforartists @HenriBeck

Contributor guide