bysquare icon indicating copy to clipboard operation
bysquare copied to clipboard

test: increase branch logic coverage

Open xseman opened this issue 6 months ago • 0 comments

Encode and decode tests can be improved to cover more branch logic. Below is the output of test coverage using npm test.

# -----------------------------------------------------------------------------------------------------------------------------
# file                    | line % | branch % | funcs % | uncovered lines
# -----------------------------------------------------------------------------------------------------------------------------
# src/base32hex.test.ts   | 100.00 |   100.00 |  100.00 | 
# src/base32hex.ts        | 100.00 |   100.00 |  100.00 | 
# src/crc32.test.ts       | 100.00 |   100.00 |  100.00 | 
# src/crc32.ts            | 100.00 |   100.00 |  100.00 | 
# src/deburr.test.ts      | 100.00 |   100.00 |  100.00 | 
# src/deburr.ts           | 100.00 |   100.00 |  100.00 | 
# src/decode.test.ts      | 100.00 |   100.00 |  100.00 | 
# src/decode.ts           |  85.31 |    64.71 |   87.50 | 70-72 94-119 121-122 186-192 202 245 247 275
# src/encode.test.ts      | 100.00 |   100.00 |  100.00 | 
# src/encode.ts           |  74.37 |    29.17 |  100.00 | 42 45 48 51-55 76-78 134-139 144-157 174-175 178-179 182-202 205-209
# src/index.ts            | 100.00 |   100.00 |  100.00 | 
# src/types.ts            | 100.00 |   100.00 |  100.00 | 
# src/validations.test.ts | 100.00 |   100.00 |  100.00 | 
# src/validations.ts      | 100.00 |   100.00 |  100.00 | 
# -----------------------------------------------------------------------------------------------------------------------------
# all files               |  94.25 |    82.53 |   98.82 |
# -----------------------------------------------------------------------------------------------------------------------------

xseman avatar Aug 23 '24 07:08 xseman