Skip to content

Commit

Permalink
feature backend: adicionando configuração de ambiente para testes no …
Browse files Browse the repository at this point in the history
…telescope
  • Loading branch information
RamonSouzaDev committed Nov 16, 2023
1 parent d0b5aac commit 80d4e98
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions backend-api/app/Providers/TelescopeServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ class TelescopeServiceProvider extends TelescopeApplicationServiceProvider
*/
public function register(): void
{
// Telescope::night();
// Disable Telescope in the testing environment
if ($this->app->environment('testing')) {
return;
}

$this->hideSensitiveRequestDetails();

Expand All @@ -24,13 +27,14 @@ public function register(): void
}

return $entry->isReportableException() ||
$entry->isFailedRequest() ||
$entry->isFailedJob() ||
$entry->isScheduledTask() ||
$entry->hasMonitoredTag();
$entry->isFailedRequest() ||
$entry->isFailedJob() ||
$entry->isScheduledTask() ||
$entry->hasMonitoredTag();
});
}


/**
* Prevent sensitive request details from being logged by Telescope.
*/
Expand Down

0 comments on commit 80d4e98

Please sign in to comment.