0.0.2 • Published 5 years ago

onlook v0.0.2

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

Onlook

Simple JavaScript code testing framework

Example

const Onlook = require('onlook')
const onlook = new Onlook({
  logTime: true
})

onlook.test('Objects are equal', () => {
  return onlook.equal({
    name: 'Joseph',
    age: 22
  }, {
    name: 'Joseph',
    age: 22
  })
})

onlook.test('Nums are the same', () => {
  return onlook.equal(17, 17)
})

onlook.test('String are equal', () => {
  return onlook.equal('qwerty', 'asdfgh')
})

that code returns the next output

Starting tests:
  ✔ Objects are equal (0ms)
  ✔ Nums are the same (0ms)
  ✖ String are equal 

API

Class Onlook accepts the next properties: logTime: Boolean - sets framework to log test execution time or not