JSPM

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

extends power-assert, 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

NPM version MIT License fliphub flipfam

don't just be sure, be fosho.

https://github.com/fliphub/fliphub

best of the best

extends

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')

resources