pytte
v0.0.1
Published
A tiny test runner
Downloads
2
Readme
🧚 PYTTE TINY TEST RUNNER 🧚
npm i --save-dev pytte
A light weight test runner made for running tests inside source files
Like so
export function addNumbers(a, b) {
return a + b;
}
// Export a "tests" object from your file
export const tests = {
"should run a test in an object": (assert) => {
assert(addNumbers(1, 2) === 3);
},
};
// Or a function
export function tests(it, assert) {
it("should run a test in a function", () => {
assert(addNumbers(1, 2) === 3);
});
}
Then use it with
pytte -d path/to/your/sourcefiles/