lestr
v0.1.2
Published
Lestr the lil' tester
Downloads
5
Readme
⚖️ Lestr the lil' tester
Summary
- :tada: 0 dependencies,
~6kb
- :zap: Blazing fast (1000 tests in ~200ms)
- :innocent: Minimal & familiar API
About
Lestr is a unit test framework I built during a weekend mostly for fun & learning.
It works surprisingly good for being a weekend project. And will probably serve your basic needs well. However, if you need snapshots or other functions, there are more mature frameworks out there.
Get started
To get it, run:
$ npm i -D lestr
Then add lestr
to your npm test
script
"scripts": {
"test": "lestr"
}
Create a file named **.test.js
Lestr will automatically find all files that end in .test.js
test('foo should pass', is => {
is.passing()
})
Then run:
$ npm test
API
Please check /tests/index.test.js
for some example tests.
Here's the full assertion API
passing()
failing()
equal()
true()
false()
bool()
number()
int()
date()
array()
object()
string()
promise()
function()
url()
undefined()
empty()
null()
Example tests:
test('arrays are equal?', is => {
const match = [1, 2]
const to = [1, 2]
is.equal(match, to)
})
test('is url', is => {
const url = 'https://gitlab.com/imlinus/lester'
is.url(url)
})
MIT License
Licensed under the MIT License