colabco / cbld-api

GNU General Public License v3.0
0 stars 0 forks source link

Feature/008 initial tests #11

Closed lululeon closed 2 months ago

lululeon commented 2 months ago

This PR closes #8

Output:

✔ test/helper.ts (2877.732513ms)
✔ support works standalone (13.348492ms)
✔ documentation endpoint loads (4249.439367ms)
✔ example is loaded (4268.504753ms)
✔ default root route (4209.861361ms)
✔ invalid route (20.158223ms)
▶ should get all projects
  ✔ returns correct content type (0.689508ms)
  ✔ project has expected properties (4.839445ms)
▶ should get all projects (4280.577898ms)
✔ should get project by id (55.118211ms)
✔ should get projects owned by id (17.996465ms)
✔ should get projects where the given user is a member (22.510086ms)
✔ should fail to get projects for the given member if user does not exist (18.100034ms)
✔ should fail to get invalid projects path (17.474798ms)
✔ should fail to get projects for invalid user (17.61683ms)
ℹ tests 15
ℹ suites 0
ℹ pass 15
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 7474.826961
------------------------|---------|----------|---------|---------|-------------------
File                    | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s 
------------------------|---------|----------|---------|---------|-------------------
All files               |     100 |       88 |   88.88 |     100 |                   
 src                    |     100 |      100 |      50 |     100 |                   
  app.ts                |     100 |      100 |      50 |     100 |                   
 src/plugins            |     100 |      100 |     100 |     100 |                   
  sensible.ts           |     100 |      100 |     100 |     100 |                   
  support.ts            |     100 |      100 |     100 |     100 |                   
 src/routes             |     100 |      100 |     100 |     100 |                   
  root.ts               |     100 |      100 |     100 |     100 |                   
 src/routes/example     |     100 |      100 |     100 |     100 |                   
  index.ts              |     100 |      100 |     100 |     100 |                   
 src/routes/v0/projects |     100 |    81.25 |     100 |     100 |                   
  index.ts              |     100 |    81.25 |     100 |     100 | 9,24,34           
------------------------|---------|----------|---------|---------|-------------------