js-unit-testing-guide
oletus
js-unit-testing-guide | oletus | |
---|---|---|
1 | 2 | |
1,935 | 45 | |
- | - | |
4.2 | 2.6 | |
7 months ago | 5 months ago | |
JavaScript | ||
- | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
js-unit-testing-guide
-
Testing of JavaScript Actions
From my point of view, unit testing of Actions doesn't have any differences from testing any other JavaScript code. In most of the examples of Actions available on the GitHub Marketplace authors don't care about writing testable code. But nothing prevents you from extracting abstractions and following The Dependency Inversion Principle which will allow you to easily mock dependencies (such as @actions/core , @actions/github, @actions/exec packages).
oletus
-
Jest not recommended to be used in Node.js due to instanceOf operator issues
I am currently one of the maintainers of Oletus.
[1] https://bun.sh/docs/cli/test
[2] https://github.com/oven-sh/bun/issues/3158
[3] https://github.com/bearror/oletus
- I will pay you cash to delete your NPM module
What are some alternatives?
github-action-ts-run-api - Library for GitHub Action integration testing
dredd - Language-agnostic HTTP API Testing Tool
actions-mocks - Mock and test helpers for GitHub Actions - Archived, please use another testing tools
node-cross-spawn - A cross platform solution to node's spawn and spawnSync
xv - 🙅♀️ ✌️ fastest test runner
cynic - simple async run-anywhere js testing framework
esm - Tomorrow's ECMAScript modules today!
mocha - ☕️ simple, flexible, fun javascript test framework for node.js & the browser
ava - Node.js test runner that lets you develop with confidence 🚀
has - Object.prototype.hasOwnProperty
units-converter - A simple utility library to measure and convert between units
contributing-tests