Simple testing framework designed to help developers write, organize, and run tests effortlessly with a clean and expressive API.
-
Lightweight & Fast: Minimal dependencies, optimized for performance
-
Flexible Test Structure: Supports describe and it blocks for organized testing
-
Asynchronous Support: Write async tests with ease using promises or async/await
-
Rich Assertions: Includes built-in expect function with common matcher methods
-
Detailed Reporting: Clear test results with pass/fail status and error messages
-
Extensible: Easily extend or customize to fit your project needs
Install via npm:
npm install testious testious-cli testious-node-runnermkdir test && cd test
tesious initCreate a node/index.node.test.js and edit:
import { test, expect } from 'testious';
test('Array utilities', (g) => {
g.it('should correctly find the length of an array', () => {
const arr = [1, 2, 3];
expect(arr.length).toBe(3);
});
g.it('should support async operations', async () => {
const fetchData = () => Promise.resolve('data');
const data = await fetchData();
expect(data).toBe('data');
});
});Finally, run test by command
testious run --node- Use descriptive test names to make your test output more readable.
- Keep tests small and focused on one behavior.
- Use async tests when working with promises or async functions.
- Structure tests into meaningful suites with describe.
Contributions are warmly welcome! Feel free to open issues or submit pull requests at: https://github.com/smtdfc/testious
Please follow the Contributor Covenant Code of Conduct to keep the community positive and respectful.
MIT License © smtdfc