DEV Community

Cover image for Good first issues for Hacktoberfest
Oliver Juhl for Medusa

Posted on • Edited on • Originally published at medusajs.com

Good first issues for Hacktoberfest

As mentioned in our previous article, Medusa is participating in Hacktoberfest for the first time this year and the excitement is high.

Getting started

There are loads of issues out there for developers to pick up, but it's not always easy to figure out where to start. We've made a series of good first issues that includes both a video tutorial and a checklist, such that you can easily get started building in public.

API fixture generation

The issues chosen for the series deal with API fixture generation. Currently, our fixtures are all stored within the same file, which is suboptimal due to 1) loading large files on the client (our API reference) is bad for performance and user experience and 2) referencing a single fixture in such a large file requires us to look for a needle in a haystack.

The goal is to split each fixture into their own dedicated file making them lightweight and easy to reference.

The issues can be found filtering on label api-fixture, or use this link for easy access.

How-to

To easily get started use the following checklist:

  • checkout docs/api
  • branch out to docs/api-[ns]-[endpoint]
  • if necessary clear dist and run yarn bootstrap
  • cd integration-tests/docs
  • yarn && yarn build
  • medusa-dev --scan-once
  • Open __tests__/[ns].js
  • Import from ../test-input/[ns]/[endpoint]
  • Add test to the toTest array
  • yarn test --watch __tests__/[ns].js -t [operationId]
  • Make changes
  • Make sure that snapshots are correctly defined so that tests pass across two runs
  • Only add the fixtures and test changes related to your generated fixtures
  • Push and open PR against docs/api

Additionally, you can watch this video tutorial
explaining the hows and whys narrated by co-founder Sebastian.

If you encounter issues, reach out to the community on Discord or submit them to our Github issue board.

Top comments (0)