0.1.2 • Published 6 years ago

lestr v0.1.2

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

⚖️ 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

Cheers
0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago