JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 40
  • Score
    100M100P100Q53481F

extends izz, fuse-box-test-runner, chai assert & should... not just sure... fosho. throws if not

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.

https://media.giphy.com/media/xT0BKk9aPtLzKJiUi4/giphy.gif

best of the best

extends

  • extends izz js
  • extends chai assert
  • extends chai should

foshizzle

  • has fluent chaining
  • supports avajs assertion planning
  • has shortest assertions, and the longest .isStr() or .str()
  • it's not not... it aint: .aintReal()

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()
})