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

Add unit tests for config and i18n

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

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
70/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
electron, github-actions, javascript, node.js

Research direction

Start with src/renderer/shared/i18n.js and src/main/config.js, then read .github/workflows/build.yml to see how the project runs its build. Add node:test coverage for the listed locale, translation, validation, migration, and merge cases; decide whether config.js needs an Electron mock or a small refactor. Done when npm test passes and runs in the build workflow.

Written by the indexing model from the issue text.

Description

enhancement help wanted

The project has no tests yet. Two modules are pure enough to start with:

  • src/renderer/shared/i18n.js: resolve() (explicit setting, "auto" with various locales like de-DE, de_AT, TR, empty), translate() (placeholders, fallback to Turkish/key), and a check that every language has the same keys and placeholders as en. That last one would have caught missing strings in translation PRs automatically.
  • src/main/config.js: validate, migrate and mergeInto (invalid enum values fall back to defaults, unknown keys are dropped, old settings files migrate). It requires electron at the top, so it may need a small refactor or a mock.

Suggestions:

  • Use the built-in node:test runner to avoid new dependencies, with an npm test script.
  • Run npm test in .github/workflows/build.yml.

Happy to discuss the approach in this issue first.

Dominant language
JavaScript
Stars
1
Forks
2
Avg merge
1d 10h
Merged PRs (30d)
2

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 Primeteumm/Screenshot-Enhancer

All issues in Primeteumm/Screenshot-Enhancer

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.