Projects STRLCPY cfonts Commits 11d4cc8d
🤬
Revision indexing in progress... (symbol navigation in revisions will be accurate after indexed)
  • ■ ■ ■ ■ ■
    README.md
    skipped 395 lines
    396 396   
    397 397  ## Contributing
    398 398  To build the repo install dependencies via:
     399 +_(Since we ship a `yarn.lock` file please use [`yarn`](https://yarnpkg.com/) for development.)_
    399 400   
    400 401  ```shell
    401 402  yarn
    skipped 2 lines
    404 405  and run the watch to continuously transpile the code.
    405 406   
    406 407  ```shell
    407  -npm run watch
     408 +yarn watch
    408 409  ```
    409 410   
    410 411  Please look at the coding style and work with it, not against it ;)
    411 412   
    412 413   
    413  -## Test
    414  -The package comes with a bunch of [unit tests](https://github.com/dominikwilkowski/cfonts/tree/master/test/unit) and a
    415  -[test suite](https://github.com/dominikwilkowski/cfonts/blob/master/test/fonttest.js) for font files.
     414 +## Tests
     415 +This package is tested on the below platform and node combinations as part of our [CI](https://github.com/dominikwilkowski/cfonts/tree/master/.travis.yml).
     416 + 
     417 +| Platform | Node |
     418 +|----------|--------|
     419 +| Linux | v10 |
     420 +| Linux | v12 |
     421 +| Linux | latest |
     422 +| OSX | v10 |
     423 +| OSX | v12 |
     424 +| OSX | latest |
     425 +| Windows | v10 |
     426 +| Windows | v12 |
     427 +| Windows | latest |
    416 428   
    417  -Run the unit tests via:
     429 +### Unit tests
     430 +The package comes with a bunch of [unit tests](https://github.com/dominikwilkowski/cfonts/tree/master/test/unit) that aim to cover 100% of the code base.
     431 +For more details about the code coverage check out [coveralls](https://coveralls.io/github/dominikwilkowski/cfonts?branch=master).
    418 432   
    419 433  ```shell
    420 434  npm run test:unit
    421 435  ```
    422 436   
    423  -Run the font test suite via:
     437 +### Type tests
     438 +Since the code base uses [JSDocs](https://jsdoc.app/) we use [typescript](https://www.typescriptlang.org/) to test the inferred types from those comments.
     439 +Typescript [supports JSDocs](https://www.typescriptlang.org/docs/handbook/type-checking-javascript-files.html#supported-jsdoc) and we use it in our
     440 +[test](https://github.com/dominikwilkowski/cfonts/blob/master/package.json#L38).
     441 + 
     442 +```shell
     443 +npm run test:types
     444 +```
     445 + 
     446 +### Font file test
     447 +There is also a [test suite](https://github.com/dominikwilkowski/cfonts/blob/master/test/fonttest.js) for font files.
    424 448   
    425 449  ```shell
    426 450  npm run test:fonts
    skipped 7 lines
    434 458   - consistent width
    435 459   - consistent lines
    436 460   
    437  -Or run all tests via:
     461 +### All tests
     462 +Run all tests via:
    438 463   
    439 464  ```shell
    440 465  npm run test
    skipped 55 lines
Please wait...
Page is in error, reload to recover