Skip to content

test: add unit tests generated by ToTheos#4

Open
ToTheos-Dev wants to merge 11 commits into
tolgee:mainfrom
ToTheos-Forks:totheos-tests/2026-05-17T06-02-52-097Z
Open

test: add unit tests generated by ToTheos#4
ToTheos-Dev wants to merge 11 commits into
tolgee:mainfrom
ToTheos-Forks:totheos-tests/2026-05-17T06-02-52-097Z

Conversation

@ToTheos-Dev
Copy link
Copy Markdown

AI-Generated Unit Tests

This PR adds AI-generated unit tests to improve coverage and ensure key functionality is tested.

Test coverage summary
Statements : 93.27% ( 111/119 )
Branches   : 92.85% ( 13/14 )
Functions  : 61.9% ( 26/42 )
Lines      : 92.23% ( 95/103 )

Coverage metrics generated by Jest, an open-source JavaScript testing framework.
Test files and commits
  • test: add config
  • test: add src/pages/translation-methods.test.tsx
  • test: add src/pages/index.test.tsx
  • test: add src/pages/_document.test.tsx
  • test: add src/pages/_app.test.tsx
  • test: add src/tolgee.test.ts
  • test: add src/components/LangSelector.test.tsx
  • test: add src/components/Namespaces.test.tsx
  • test: add src/components/Navbar.test.tsx
  • test: add src/views/TranslationMethods.test.tsx
  • test: add src/views/Todos.test.tsx
How to run tests

Jest is included as a dev dependency.

Run tests directly

./node_modules/.bin/jest

Optional: add npm scripts

You can add convenient scripts to package.json:

{
  "scripts": {
    "test": "jest",
    "test:watch": "jest --watch",
    "test:coverage": "jest --coverage --coverageReporters=text-summary"
  }
}

Usage examples

Run tests once:

npm test

Run tests in watch mode during development:

npm run test:watch

Run tests with coverage summary:

npm run test:coverage

This contribution was created with assistance from ToTheos (https://totheos.com) to support test generation, code refactoring, and pull request preparation for an open-source codebases.

The tool was used to automate routine software development tasks.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 17, 2026

@TESTPERSONAL is attempting to deploy a commit to the Stepan Granat's projects Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant