Skip to content

Commit

Permalink
Test env: turn debug on to catch warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix committed Sep 10, 2021
1 parent 435119c commit aa7cfd3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion packages/env/lib/config/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ module.exports = async function readConfig( configPath ) {
env: {
development: {}, // No overrides needed, but it should exist.
tests: {
config: { WP_DEBUG: false, SCRIPT_DEBUG: false },
// Debug should be turned on so that developer warnings are
// caught.
port: 8889,
},
},
Expand Down
8 changes: 4 additions & 4 deletions packages/env/lib/config/test/__snapshots__/config.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ Object {
},
"tests": Object {
"config": Object {
"SCRIPT_DEBUG": false,
"SCRIPT_DEBUG": true,
"TEST": 200,
"TEST_VAL1": 1,
"TEST_VAL2": "hello",
"TEST_VAL3": false,
"WP_DEBUG": false,
"WP_DEBUG": true,
"WP_ENVIRONMENT_TYPE": "local",
"WP_HOME": "http://localhost:1000/",
"WP_PHP_BINARY": "php",
Expand All @@ -58,8 +58,8 @@ Object {

exports[`readConfig wp config values should use default config values 1`] = `
Object {
"SCRIPT_DEBUG": false,
"WP_DEBUG": false,
"SCRIPT_DEBUG": true,
"WP_DEBUG": true,
"WP_ENVIRONMENT_TYPE": "local",
"WP_HOME": "http://localhost:8889/",
"WP_PHP_BINARY": "php",
Expand Down
2 changes: 1 addition & 1 deletion packages/env/lib/config/test/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -1076,7 +1076,7 @@ describe( 'readConfig', () => {
SCRIPT_DEBUG: '2',
TEST3: 'foo',
TEST: '2',
WP_DEBUG: false,
WP_DEBUG: true,
WP_ENVIRONMENT_TYPE: 'local',
WP_PHP_BINARY: 'php',
WP_TESTS_EMAIL: '[email protected]',
Expand Down

0 comments on commit aa7cfd3

Please sign in to comment.