Avalander / yuki

1 stars 0 forks source link

Complete unit tests for commands/util module #8

Closed Avalander closed 4 years ago

Avalander commented 5 years ago

The module commands/util has some unit tests, but some functions are not covered at all. The tests are in the file src/commands/__test__/util.test.js and the tests can just be added to that file.

The test coverage can be checked by running the following script:

npm run test:coverage

Functions that need coverage

makePipe is slightly more complex to test. It receives a first parameter that can be any of string, RegExp or function and an arbitrary number of parameters that are functions. These things should be tested: