[FEATURE] bun run integration-tests should print out the time elapsed for the entire test runner

Open Beginner friendly
#19 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
62/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Stale
Tech stack
bun, docker, typescript
Domain
devops, testing

Research direction

Start in scripts/integration-tests.ts, which is invoked by bun run integration-tests, and inspect where the API and integration test runner start and finish. Run the integration test command before and after the change; done means the output reports elapsed time for the entire runner, including Docker startup and shutdown.

Written by the indexing model from the issue text.

Description

good first issue priority: low

Right now, when you run it, you'll see something like

$ bun run integration-tests
$ bun run scripts/integration-tests.ts
API started, running tests...
bun test v1.2.18 (0d4089ea)

tests/integration/login-flow.test.ts:
✓ Verify Email Flow > If I make a request with an unregistered email, I get an error [503.61ms]
✓ Verify Email Flow > If I make a request with an inactive user, I get an error [466.92ms]
✓ Verify Email Flow > If I make a request with the wrong password, I get an error [739.82ms]
✓ Verify Email Flow > If I make a request with the correct credentials, I get a session ID and refresh token [715.19ms]

tests/integration/register-flow.test.ts:
✓ Register Flow > doesn't store invalid credentials [11.12ms]
✓ Register Flow > stores valid credentials [637.33ms]

 6 pass
 0 fail
 19 expect() calls
Ran 6 tests across 2 files. [4.51s]
Integration tests passed

It would just be nice to know how much time the test running took on top of that to startup and shutdown docker.

Dominant language
TypeScript
Stars
3
Forks
2
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from codeforsanjose/TallyUp

All issues in codeforsanjose/TallyUp

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.