Skip to content

Use of Array.prototype.includes breaks unit tests in browsers that do not support this. #608

Closed
@honeroku

Description

@honeroku

Version

1.0.0-beta.16

Reproduction link

https://codesandbox.io/s/7ykvrxrw0

Steps to reproduce

  1. Download codesandbox codes.
  2. Run tests on IE11 with karma.

What is expected?

Tests should pass or fail, but not be terminated.

What is actually happening?

Test is terminated due to "TypeError: Object doesn't support property or method 'includes"


Same as #499 which reports use of 'Array.prototype.find'.

The specific line is:
https://github.com/vuejs/vue-test-utils/blob/v1.0.0-beta.16/packages/test-utils/src/wrapper.js#L519

Array.prototype.includes supported browsers:
https://caniuse.com/#search=Array.prototype.includes

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