Skip to content

wp-env doesn't honor testsEnvironment default value. #84710

Open

Description

@Hug0-Drelon

Description

As per wp-env documentation, the default value for testsEnvironment is false. This is not the case when running npx wp-env start with a config omitting testsEnvironment.

Step-by-step reproduction instructions

For the following .wp-env.test.json:

{
  "phpVersion": "8.4",
  "core": null,
  "port": 8893,
  "plugins": [ "." ]
}

Running npx wp-env --config=.wp-env.test.json start spins up two environments (dev and tests). See the output bellow:

⚠ Warning: wp-env starts both development and tests environments by default.
This behavior is deprecated and will be removed in a future version.
To avoid this warning, add "testsEnvironment": false to your .wp-env.json.
The "env", "testsPort", and "testsEnvironment" options are also deprecated.
Use the --config option with a separate config file for test environments instead.

WordPress development site started at http://localhost:8893
MySQL is listening on port 32769
WordPress test site started at http://localhost:8889
MySQL for automated testing is listening on port 32768

Moreover, we get a depreciation notice even if --config flag has been passed.

Screenshots, screen recording, code snippet

No response

Environment info

  • @wordpress/env 11.17.0
  • MacOS 27.0.1

Please confirm that you have searched existing issues in the repo.

  • Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

  • Yes

Please confirm which theme type you used for testing.

  • Block
  • Classic
  • Hybrid (e.g. classic with theme.json)
  • Not sure
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

[Status] In ProgressTracking issues with work in progress[Type] BugAn existing feature does not function as intended

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions