Esempio n. 1
0
test('should throw TypeError if not function passed to `.use` method', function (done) {
  function fixture () {
    limon.use(123)
  }

  test.throws(fixture, TypeError)
  test.throws(fixture, /expect `fn` be function/)
  done()
})
Esempio n. 2
0
test('should throw TypeError if not function given', function (done) {
  function fixture () {
    isAsyncFunction(12345)
  }

  test.throws(fixture, TypeError)
  test.throws(fixture, /is-async-function expect a function/)
  done()
})
Esempio n. 3
0
test('should throw TypeError on missing input', function (done) {
  function fixture () {
    limon.tokenize(123)
  }

  test.throws(fixture, TypeError)
  test.throws(fixture, /expect `input` be non-empty string/)
  done()
})