Skip to content

Document how to use babel-polyfill to polyfill the test environment #727

@novemberborn

Description

@novemberborn

AVA does not load polyfills when running tests. This means features like ['foo', 'bar'].includes('foo') are not available. We should update the ES2015 docs to point this out, and add a recipe explaining how to use babel-polyfill with AVA.

There should be a caveat to the latter that users shouldn't load babel-polyfill unless they also use it in their applications, since the polyfill will apply to both test and source files.

See #263 for background.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions