Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

test(notes): add an integration test for template→database page creation

Open
#43 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
72/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Quiet
Tech stack
mongodb, nextjs, typescript
Domain
api, databases, testing

Research direction

Start with src/app/api/notes/route.ts and the existing unit and template-block invariant tests to understand the POST flow and test setup. Add an integration test using a MongoDB test instance for student-dashboard and roadmap, then verify database creation, real database block ids, and cross-database relationDbIds with no sentinels remaining.

Written by the indexing model from the issue text.

Description

enhancement

Database-backed templates create a NotesDatabase server-side and swap the dbBlock() sentinel(s) for real ids (src/app/api/notes/route.ts), including cross-DB relation rewrites for the roadmap template. Pure helpers are unit-tested and the template-block wiring has invariant tests, but the server creation + sentinel/relation swap path has no integration coverage (it needs Mongo).

Add an integration test (e.g. mongodb-memory-server) that POSTs /api/notes with a multi-DB template (student-dashboard, roadmap) and asserts: the databases are created, the page content's database block ids are real (no sentinels remain), and relation relationDbIds point at the sibling DB's real id.

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

Getting set up

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 TemaDeveloper/personal_planner

All issues in TemaDeveloper/personal_planner

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.