Northeastern-Electric-Racing / Northeastern-Electric-Racing/FinishLine

Work Package Templates - Edit Endpoint Unmocked Tests

Open
#2,274 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

back-end medium
Dominant language
TypeScript
Stars
36
Forks
9
Avg merge
4d 21h
Merged PRs (30d)
11

Description

Blocked By #2150

We are making tests in a new way that uses an actual database rather than mocking calls to prisma. You can run these tests by running yarn test:setup, then running yarn test (make sure to run yarn test:teardown whenever you're done). You can see examples of how to do these new tests in src\backend\tests\unmocked\team-type.test.ts; however, these tests are still pretty new, so it's likely you'll have to figure out something we haven't done yet.

This ticket is to make tests of this new type for the edit work package template endpoint (create a new file for this in the unmocked tests folder if need be)

Contributor guide

No contributing guide indexed for this repository

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.

Research direction

Run yarn test:setup, then review src\backend\tests\unmocked\team-type.test.ts for the actual-database testing pattern. Add or update an unmocked test file for the edit work package template endpoint, run yarn test, and use yarn test:teardown when finished; done means the endpoint is covered without mocked Prisma calls.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, backend, testing
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.