Skip to content

testEnvironmentOptions for custom environment throw a validation warningΒ #6849

@Hypnosphi

Description

@Hypnosphi

πŸ’₯ Regression Report

Using (jest-environment-enzyme)[https://github.com/FormidableLabs/enzyme-matchers/tree/master/packages/jest-environment-enzyme], I get following warning:

● Validation Warning:

  Unknown option "testEnvironmentOptions.enzymeAdapter" with value "react16" was found.
  This is probably a typing mistake. Fixing it will remove this message.

Last working version

Worked up to version: 23.4.2

Stopped working in version: 23.5.0

To Reproduce

Run Jest with following config:

{
  "setupTestFrameworkScriptFile": "jest-enzyme",
  "testEnvironment": "enzyme",
  "testEnvironmentOptions": {
    "enzymeAdapter": "react16"
  }
}

Expected behavior

No warning

Run npx envinfo --preset jest

Paste the results here:

  System:
    OS: macOS High Sierra 10.13.6
    CPU: x64 Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz
  Binaries:
    Node: 8.11.2 - ~/.nvm/versions/node/v8.11.2/bin/node
    Yarn: 1.7.0 - /usr/local/bin/yarn
    npm: 5.6.0 - ~/.nvm/versions/node/v8.11.2/bin/npm
  npmPackages:
    jest: ^23.5.0 => 23.5.0 

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