linagora / ToM-server

GNU Affero General Public License v3.0
11 stars 3 forks source link

Client server test coverage #87

Closed Mathixx closed 2 months ago

Mathixx commented 2 months ago

Added profile CRUD test for MatrixDb to ensure correct test coverage

guimard commented 2 months ago

Test still broken with insufficient coverage :

       -----------------------------------|---------|----------|---------|---------|-------------------
       File                               | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s 
       -----------------------------------|---------|----------|---------|---------|-------------------
       All files                          |   73.02 |    51.35 |   55.55 |   72.98 |                   
        src                               |   94.11 |      100 |   72.72 |      94 |                   
         index.ts                         |    92.1 |      100 |   66.66 |   91.89 | 43-50             
         types.ts                         |     100 |      100 |     100 |     100 |                   
        src/account                       |     100 |       50 |      80 |     100 |                   
         whoami.ts                        |     100 |       50 |      80 |     100 | 16                
        src/admin                         |     100 |      100 |   88.88 |     100 |                   
         whois.ts                         |     100 |      100 |   88.88 |     100 |                   
        src/matrixDb                      |     100 |      100 |     100 |     100 |                   
         index.ts                         |     100 |      100 |     100 |     100 |                   
        src/matrixDb/sql                  |   92.59 |    33.33 |   91.66 |   95.83 |                   
         sqlite.ts                        |   92.59 |    33.33 |   91.66 |   95.83 | 87                
        src/utils                         |   37.64 |    34.78 |   14.28 |   37.64 |                   
         authenticate.ts                  |     100 |      100 |     100 |     100 |                   
         userInteractiveAuthentication.ts |   11.66 |        0 |    3.22 |   11.66 | 30-118,130-209    
       -----------------------------------|---------|----------|---------|---------|-------------------
       Jest: "global" coverage threshold for statements (90%) not met: 73.02%
       Jest: "global" coverage threshold for branches (80%) not met: 51.35%
       Jest: "global" coverage threshold for lines (90%) not met: 72.98%

       Test Suites: 2 passed, 2 total
       Tests:       15 passed, 15 total
       Snapshots:   0 total
       Time:        7.463 s, estimated 9 s