Skip to content

Commit

Permalink
test: set TEST_MODE environment variable in test setup
Browse files Browse the repository at this point in the history
- add TEST_MODE=1 setting before requiring the main script
- ensure tests can run without triggering script exit
- improve test isolation and control over script behavior
  • Loading branch information
scriptprivate authored Aug 9, 2024
1 parent afdd39d commit 3176d92
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/security-gate.t
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ use Test::MockObject;
use Test::Output;
use Mojo::JSON qw(encode_json);

$ENV{TEST_MODE} = 1;

my $mock_ua = Test::MockObject -> new();
$mock_ua -> fake_module('Mojo::UserAgent');
$mock_ua -> fake_new('Mojo::UserAgent');
Expand Down

0 comments on commit 3176d92

Please sign in to comment.