auto-arrange-plugin
auto-arrange-plugin copied to clipboard
test: add unit tests generated by ToTheos
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 configtest: add src/presets/classic/index.test.tstest: add src/presets/types.test.tstest: add src/presets/index.test.tstest: add src/types.test.tstest: add src/index.test.tstest: add src/appliers/index.test.tstest: add src/appliers/applier.test.tstest: add src/appliers/list/standard.test.tstest: add src/appliers/list/transition/animation.test.tstest: add src/appliers/list/transition/index.test.tstest: add src/appliers/list/transition/index.test.ts
How to run tests
Jestis included as a dev dependency.Run tests directly
./node_modules/.bin/jestOptional: 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 testRun tests in watch mode during development:
npm run test:watchRun 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 https://retejs.org/docs/development/rete-cli https://github.com/retejs/rete/blob/main/package.json#L10