auto-arrange-plugin icon indicating copy to clipboard operation
auto-arrange-plugin copied to clipboard

test: add unit tests generated by ToTheos

Open ToTheos-Dev opened this issue 6 months ago • 1 comments

AI-Generated Unit Tests

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

Test coverage summary
Statements : 87.97% ( 139/158 )
Branches   : 70% ( 119/170 )
Functions  : 82.45% ( 47/57 )
Lines      : 88.27% ( 128/145 )

Coverage metrics generated by Jest, an open-source JavaScript testing framework.
Test files and commits
  • test: add config
  • test: add src/presets/classic/index.test.ts
  • test: add src/presets/types.test.ts
  • test: add src/presets/index.test.ts
  • test: add src/types.test.ts
  • test: add src/index.test.ts
  • test: add src/appliers/index.test.ts
  • test: add src/appliers/applier.test.ts
  • test: add src/appliers/list/standard.test.ts
  • test: add src/appliers/list/transition/animation.test.ts
  • test: add src/appliers/list/transition/index.test.ts
  • test: add src/appliers/list/transition/index.test.ts
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 run 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.

ToTheos-Dev avatar May 18 '26 06:05 ToTheos-Dev

@ToTheos-Dev https://retejs.org/docs/development/rete-cli https://github.com/retejs/rete/blob/main/package.json#L10

Ni55aN avatar May 18 '26 16:05 Ni55aN