fix: enable glitchtip error reporting on the client side

This commit is contained in:
2026-07-17 15:04:44 +02:00
parent 51a8e63d63
commit 0f554f2317
6 changed files with 59 additions and 4 deletions

View File

@@ -0,0 +1,20 @@
import { readFileSync } from 'fs';
import { resolve } from 'path';
import { describe, it, expect } from 'vitest';
import * as dotenv from 'dotenv';
describe('Sentry Configuration', () => {
it('should have a valid SENTRY_DSN in .env', () => {
// Read the .env file as a string
const envPath = resolve(process.cwd(), '.env');
const envContent = readFileSync(envPath, 'utf8');
// Parse it using dotenv
const envConfig = dotenv.parse(envContent);
// Assert that SENTRY_DSN is defined and not empty
expect(envConfig.SENTRY_DSN).toBeDefined();
expect(envConfig.SENTRY_DSN.length).toBeGreaterThan(0);
expect(envConfig.SENTRY_DSN).toMatch(/^https:\/\/.+@glitchtip.infra.mintel.me\/\d+$/);
});
});