Package Exports
- fosho
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (fosho) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
💯 fosho
don't just be sure, be fosho.
best of the best
extends
- extends izz
- extends chai assert
- extends chai should
- extends fuse-box-test-runner
foshizzle
- has fluent chaining
- supports avajs assertion planning
- has shortest assertions, and the longest
.isStr()
or.str()
- it's not not... it aint:
.aintReal()
- uses power-assert
📦 usage
yarn add fosho
npm i fosho --save
📘 examples
example (avajs)
const test = require('ava')
const fosho = require('fosho')
class Workflow {}
test('fosho', (t) => {
fosho('eh')
.isReal()
.isStr().str() // long or short hands
.aintFunction()
const fnb = () => {}
function func() {}
fosho(fnb)
.fn()
.aintBindable()
fosho(func)
.isFunction()
.bindable()
.all(['function', 'bindable'])
fosho(fnb)
.fn()
.aintInstanceOf(Workflow)
fosho('nice boulder')
.str()
.findString('nice')
.findString('boulder')
fosho(['one'])
.lengthOf(1)
.typeOf('array')
fosho(1)
.beAbove(0)
.beBelow(2)
.isAbove(0)
.isBelow(2)
.above(-1)
.below(2)
})
test('fosho not a nice boulder...', (t) => {
t.throws(() => {
fosho({niceBoulder: true})
.isReal()
.isObj()
.instanceOf(Workflow)
})
})
// works with assertion planning
test('plan fosho', (t) => {
t.plan(2)
fosho({niceBoulder: true}, t)
.isReal()
.isObj()
})
exports
it also exports fliplog chai assert and chai should
const {fosho, log, should, assert} = require('chai')