Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ava-earl

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ava-earl

AVA CLI for Earl Grey test files.

  • 0.3.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

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

Keywords

FAQs

Package last updated on 10 Sep 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc