0.3.0 • Published 9 years ago

ava-earl v0.3.0

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

ava-earl

Earl Grey npm package

A CLI replacement for AVA that works for AVA tests written in Earl Grey

Install

npm i -D ava-earl

Usage

Add a test file:

require-macros: ava-earl -> {test, serial-test}

serial-test .baz:
   @false(1 == 2)
   @not("hello", "world")
   @end()

test .foo:
   @pass()
   @end()

test .bar:
   @plan(2)

   set-timeout(fn, 100) where fn = ->
      @equals(.bar, .bar)
      @same({.a, .b}, {.a, .b})

Add ava-earl to your package.json scripts:

{
  "scripts": {
    "test": "agave"
  }
}

ava-earl's executable is called agave because it's memorable and has all the letters of ava and the initials of Earl Grey.

Then run it:

$ npm test

Differences

The executable will only search for .eg files. If you want to use ava with JavaScript files then use ava directly. Currently ava-earl does not support running some tests in Earl Grey and others in JavaScript.

The macro allows you to write tests using the @ symbol to represent t and it fills out the function details behind the scenes. It also aliases several functions that are builtins for Earl Grey:

in avain ava-earl
isequals
notnequals
trueis-true
falseis-false
passpasses

Currently it only supports named tests and the minimal amount of boilerplate already here makes me feel that it's really unnecessary to go any further. Not to mention, there might be some added complexity with supporting the named function format.

Documentation

To learn more about ava check out their documentation.

License

MIT © Jake Russo et al

0.3.0

9 years ago

0.2.0

9 years ago

0.1.4

9 years ago

0.1.2

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago