withoutVite();
});
test('nothing is rendered without a browser dsn', function () {
config()->set('monitoring.browser.dsn', null);
expect(Blade::render(''))->toBe('');
});
test('the configuration carries dsn, release and the user id only', function () {
config()->set('monitoring.browser.dsn', 'https://public@glitchtip.test/2');
config()->set('sentry.release', 'abc1234');
$user = User::factory()->create(['email' => 'kunde@example.com']);
$this->actingAs($user);
$html = Blade::render('');
preg_match('/toMatchArray([
'dsn' => 'https://public@glitchtip.test/2',
'release' => 'abc1234',
'userId' => $user->id,
'area' => 'portal',
])
->and($html)->not->toContain('kunde@example.com');
});