Skip to content

Library wrapping Ava #268

Open
Open
@ehmicky

Description

@ehmicky

Some libraries might be wrapping Ava, for example:

const test = require('custom-ava')

or:

const test = require('custom-ava')(require('ava'))

Also the test() function (and its variants .skip(...), etc.) might be wrapped as well and provide slightly different arguments:

const test = require('ava-test-each')
test(
  ['red', 'green', 'blue'], 
  'example test', 
  (t, color) => {
    t.is(typeof color, 'string')
  }
)

I think this does not work with eslint-plugin-ava because this plugin might rely on (correct me if I'm wrong):

  • the library exporting test() being called "ava"
  • the test() signature not being modified
  • the main test function being called test() (that one should not be an issue though)

I am considering developing a small wrapper around Ava but I am realizing using that wrapper might not be compatible with eslint-plugin-ava. Would it be possible to add support for such wrappers?

I understand that might add lots of complexity, so feel free to close this issue if you don't think it's a good idea :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions